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
Equi join and non equi join is possible with sql server?
What is table value parameters (tvp)?
Explain differentiate between a having clause and a where clause?
What are dml triggers and types of dml triggers?
What is microsoft sql server?
How do I start and stop sql server?
What is data source object?
What are alternate keys?
What are extended events in sql server?
Can I use sql azure as a backup with log shipping or database mirroring?
Why I am getting this error when renaming a database in ms sql server?
What is xml datatype?
What is replication and database mirroring?
can you implement data mining in SSRS?
What is report snapshot?