这是mysql查询
select distinct C.sid
from Catalog C
where not exists
( select * from Parts P where P.pid = C.pid and P.color != 'red');
但它退回了供应红色零件的供应商,而不仅仅是红色零件?以及如何改变它的想法
我有 3 张桌子
Suppliers(sid: integer, sname: string, address: string)
Parts(pid: integer, pname: string, color: string)
Catalog(sid: integer, pid: integer, cost: real)
任何帮助将不胜感激,谢谢