且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么使用子查询时我的结果重复?

更新时间:2023-11-30 21:50:22

select A.userNum from users A where A.userNum NOT IN  (select A.userNum from users A, addressbook B, (select A.userNum from users A, addressbook B where B.userNum=1 and B.phone=A.phone) C where C.userNum=B.userNum and A.phone=B.phone) ;