What is the difference between IN and EXISTS operators in
SQL Server?
Answer Posted / vijaykumar dolli
using the IN clause, you're telling the rule-based
optimizer that you want the inner query to drive the outer
query (think: IN = inside to outside).
When you write EXISTS in a where clause, you're telling the
optimizer that you want the outer query to be run first,
using each value to fetch a value from the inner query
(think: EXISTS = outside to inside).
Thank you
| Is This Answer Correct ? | 106 Yes | 15 No |
Post New Answer View All Answers
Which trace flags are enabled in sql server?
What is subquery explain with example?
What type of Index will get created after executing the above statement?
What is optimization and its types?
You want to be sure that queries in a database always execute at the maximum possible speed. To achieve this goal you have created various indexes on tables which other statement will keep the database in good condition?
Explain nested trigger in sql?
What is the maximum size per database for sql server express?
What are the security related catalog views? : sql server security
Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?
What is data mart? : sql server analysis services, ssas
How to execute function in stored procedure sql server?
What are the properties and different types of sub-queries?
How do you rename a table in sql server?
What are ddl (data definition language) statements for tables in ms sql server?
Does dbcc checkdb requires db to be in single_user mode? : sql server database administration