What is the difference between the EXISTS
and IN
clause in SQL?
When should we use EXISTS
, and when should we use IN
Which one is faster depends on the number of queries fetched by the inner query:
EXIST evaluate on true or false but IN compare multiple value. When you don't know the record is exist or not, your should choose EXIST