6 个解决方案
#1
select stu_id from A where a.stu_id not in (select stu_id from B)
#2
select * form A where stu_id not in (select stu_id from B)
#3
select stu_id from A where stu_id not in (select stu_id from B)
#4
打个补丁:
select * form A where stu_id not in (select stu_id from B where stu_id is not null)
select * form A where stu_id not in (select stu_id from B where stu_id is not null)
#5
select stu_id from A where stu_id not in (select distinct stu_id from B)
#6
谢谢!
#1
select stu_id from A where a.stu_id not in (select stu_id from B)
#2
select * form A where stu_id not in (select stu_id from B)
#3
select stu_id from A where stu_id not in (select stu_id from B)
#4
打个补丁:
select * form A where stu_id not in (select stu_id from B where stu_id is not null)
select * form A where stu_id not in (select stu_id from B where stu_id is not null)
#5
select stu_id from A where stu_id not in (select distinct stu_id from B)
#6
谢谢!