IN子查询与EXISTS子查询

IN和EXISTS能够与相关子查询一块儿使用,通常状况下下面两对SQL语句的返回结果是同样的。 当关系条件只有一个时: select * from A where A.id in (select B.id from B) select * from A where exists (select NULL from B where A.id = B.id) 当关系条件只有多个时: select *
相关文章
相关标签/搜索