What is the difference between WHERE AND IN?
OR
1. SELECT * FROM EMPLOYEE WHERE EMPID=123
2. SELECT * FROM EMPLOYEE WHERE EMPID IN (123)
WHAT IS THE DIFFERENCE?
Answer Posted / aditya bisoi
Actually Both Query will return Same Result....
But Performance wise 1st Query better..Bcz it will return the Exact Record with out check hole record in the table....
But when we use IN operator then the sql engine will do the Table scan and retrive the Result...
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Explain an incremental backup?
What is a mixed extent?
How data can be copied from one table to another table?
List the types of recovery model available in sql server?
Why the trigger fires multiple times in single login?
When I delete any data from a table, does the sql server reduce the size of that table?
What are the fixed server level roles? : sql server security
How do I find query history in sql server?
What is normalization according to you and explain its different levels?
What is self contained multi valued query?
What do you understand by replication in sql server?
Can a trigger be created on a view?
What is the main purpose of having conversation group?
How to verify the port number of the sql server?
What is the use of sign function?