网问答>>sql问题...
问题
已解决

sql问题...

时间:2019-10-12 09:37:48
select tmpA.* from tmpA where not exists ( select 1 from tmpB where tmpA.id=tmpB.id and tmpB.status!=1)和select tmpA.* from tmpA inner join tmpB on tmpA.id=tmpB.id and tmpB.status=1两个结果不一样,是为什么?
最佳回答
条件写的都一样, 上面是 not exist 下面是on 肯定相反了
时间:2019-10-12 09:37:56
这sql语句看的我头皮发麻
时间:2019-10-12 09:38:03
select tmpA.* from tmpAwhere not exists (select 1 from tmpB where tmpA.id!=tmpB.id or tmpB.status!=1)
时间:2019-10-12 09:38:04
本类最有帮助
Copyright © 2008-2013 www.wangwenda.com All rights reserved.冀ICP备12000710号-1
投诉邮箱: