What is the difference between IN and EXISTS operators in
SQL Server?
Answer Posted / monal
HERE'S THE SIMPLE ANSWER:
WHEN YOU USE 'IN', WHILE CHECKING FOR WHERE CONDITION SQL
SERVER ENGINE DOES WHOLE TABLE SCAN.
IF YOU USE 'EXISTS' AS SOON AS ENGINE FINDS THE REQUIRED
ROW IT WILL STOP EXECUTING QUERY AND GOING FURTHER SCANNING
TABLE.
SO BASICALLY EXISTS IS FASTER AS COMPARED TO IN.
| Is This Answer Correct ? | 146 Yes | 14 No |
Post New Answer View All Answers
Can you change the data type of a column in a table after the table has been created? If so, which command would you use?
Explain four layers of abstraction microsoft architectured?
How can you manage sql azure security?
What is blocking and how would you troubleshoot it? : sql server database administration
why would you call update statistics? : Sql server database administration
Do you know how to implement service broker?
What is tablesample?
New concepts of sql server 2005 use in your project.
tell me the disaster recovery plan
What is index in an assignment?
What is the guest user account in sql server? What login is it mapped to it? : sql server security
What protocol does sql server use?
what is the Ticketing tool used in Wipro technologies at Bangalore...???
What does it mean to manipulate data?
Name 3 ways to get an accurate count of the number of records in a table?