What is the diffrence between IN and EXISTS.which one is
faster.
Answer Posted / neha
In the in clause, the inner query is executed first, hence if the inner query return less data than the outer query, then use IN clause, in the other scenario, user exists clause.
Also, in the exists clause the inner query always reference outer query's table, which may or may not be the case with in IN clause.
Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is a relationship and what are they?
Can we rollback after truncate?
Explain foreign key in sql?
What is the maximum size of sqlite database?
What is a join?
What are aggregate functions in sql?
Why trigger is used in sql?
Which is faster count (*) or count 1?
How do you identify a primary key?
What is normalization? How many normalization forms are there?
Which one is better subquery or joins?
How to revise and re-run the last sql command?
What is meaning of <> in sql?
what is the difference between nested subquery and correlated subquery?
What is a null value?