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
What are examples of triggers?
OPTIMIZATION OF SP,CURSOR,TRIGGERS
What are the different acid properties?
You are creating an application where users are asked their gender in the gender combo box you have three options: ‘male’ , ‘female’ and ‘i choose not to disclose’ these options are stored in the table as 1, 0 or null which datatype should you use?
How do I find sql server instance name?
Does any body please help me what question's have asked for SSRS in the interview?
What is a scheduled job or what is a scheduled task?
What are the limitations in ssrs on sql server express edition?
How to connect php with different port numbers?
What are the different types of replication are there in sql server 2000?
What is the meaning of sql server?
How we create SQL Server 2005 Reporting Services ? Give me Sample
How to delete an existing database user?
What do you understand by triggers and mention the different types of it?
Do you know what is fill factor and pad index?