select * from BB where A not in (select A from AA where A is not null)
or
select * from BB b where not exists (select 1 from AA a where a.A = b.A)是要表达这个意思吗?
or
select * from BB b where not exists (select 1 from AA a where a.A = b.A)是要表达这个意思吗?
调试欢乐多
当前a员工所属部门已经是BB了,则查询还需要什么呢?
select * from 人员表 where 部门id = AA的部门id
select * from 人员表 where 部门id = BB的部门id
不就行了?