2条很简单的查询sql //查询出不等于 张三 的所有用户
select * from UserID a where
not exists (select * from UserName t where a.ID=t.ID and t.Name='张三') select * from UserID u where u.ID
not in(select ID from UserName t where t.Name='张三') 类似已上的情况 哪种查询性能会更优。
如果优的话,请说明原理!
谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货