Difference between EXISTS and IN in SQL?

前端 未结 21 1732
执笔经年
执笔经年 2020-11-22 16:50

What is the difference between the EXISTS and IN clause in SQL?

When should we use EXISTS, and when should we use IN

21条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 17:35

    As per my knowledge when a subquery returns a NULL value then the whole statement becomes NULL. In that cases we are using the EXITS keyword. If we want to compare particular values in subqueries then we are using the IN keyword.

提交回复
热议问题