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 partitioned view?
explain declarative management framework (dmf) in sql server 2008?
How do I create a partition table in sql server?
What are the advantages of the mirroring?
What are the restrictions applicable while creating views? : SQL Server Architecture
How many tables can be joined in SQL Server?
what is an index? : Sql server database administration
You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?
Why olap is used?
What are the joins in sql server? : sql server database administration
Explain system scalar functions?
What is the fastest way to permanently delete a 1 million row table named customers?
What is sql service broker?
How you provide security to cube? : sql server analysis services, ssas
What is difference between views and tables?