请大家帮忙看看这个SQL语句
现在有这样的一个数据表(SP)
供应商号(Sno) 零件号(Pno) 零件数量(Qty)
查询至少包含了供应商号"168"所供应的全部零件的Sno
请大家帮忙看看这个SQL语句怎么填写完整?谢谢
select Sno
from SP SPX
where ___
(select * from SP spy where ____and not exists
(select * from SP spz where ____));
[解决办法]
select * from (select * from SP where (select count(*) from SP group by id having Sno='168')>=1)a where 条件
[解决办法]
select * from sp where charindex('168',sno)>0
[解决办法]
select * from sp where charindex( '168',sno) >0--select * from sp where sno like '%168%'select * from sp where sno like '168%'select * from sp where sno like '%168'
[解决办法]
select Sno
from SP SPX
where ___
(select * from SP spy where ____and not exists
(select * from SP spz where ____));
楼主意思就用这个格式?