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
What are sql dirty pages?
Why I am getting "the microsoft .net framework 2.0 in not installed" message?
Tell me what is log shipping?
How to defragment indexes with alter index ... Reorganize?
Is port 1433 secure?
What does Master database contains?
what is the sql equivaent of the dataset relation object ?
What are the properties of the transaction?
Explain what is “asynchronous” communication in sql server service broker?
Some queries related to SQL
How to recover from sql injection? : sql server security
Does sql server 2000 clustering support load balancing?
Explain about SQL server 2005?
Difference between Inner vs outer joins?
What is resultset concur_updatable?