sql joins 与 in

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chenchen879689889/article/details/82178461

in: 先筛查出结果集,再在结果集中筛选。  select * from A where A.id in(select B.id from B where B.DZ='110' ) and A.DZ='110'

             这个的结果是  B.DZ=110 与 A.DZ=110 都得满足的条件

猜你喜欢

转载自blog.csdn.net/chenchen879689889/article/details/82178461