回顾SQL中exists与in的区别

一 概述

in()实例

select * from A  where id in (select id from B);

exists()实例

select * from A where exists (selet 1 from B where A.id = B.id)

二 In()语句的工作原理

暂时总结到这里,待续

猜你喜欢

转载自blog.csdn.net/calm_encode/article/details/113916845