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
Are there any preferred steps that need to be taken care of before starting the installation of sql server 2000?
What is constraints and its types?
What is NOT NULL Constraint in sql server 2012?
Explain about sql server login?
In one interview...interviewer ask me question pleas tell me sql server architecture.. can any body tell me the sql server architecture with digram
What are built in functions?
How exceptions can be handled in sql server programming?
Can you always create a cache of a report?
How to create a trigger for insert only?
What does this statement do @@rowcount?
How to view existing indexes on an given table using sys.indexes?
Explain what role entity and relationship play in an ER diagram.
Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60
What are different types of views?