27,579
社区成员
发帖
与我相关
我的任务
分享
select name from A where (select count(name) from A where a.code='001' and b.code='002')<2
SELECT * FROM 表A where code_name+code not IN(SELECT name+code from 表B )
SELECT * FROM 表A where code_name+code IN(SELECT name+code from 表B )
select A.name
from A
group by A.name
having count(distinct A.code) < (select count(*) from B)
select
A.name
from
A,B
where
A.code=B.Code
group by
A.name
having
count(distinct A.code)=(select count(1) from B)
select A.name
from A,B
where A.code=B.Code
group by A.name
having count(distinct A.code) < (select count(*) from B)