+ 1
What will be the correct output of this query
Consider the following relational schema Suppliers(sid:integer, sname:string, city:string, street:string) Parts(pid:integer, pname:string, color:string) Catalog(sid:integer, pid:integer, cost:real) Consider the following relation query for the above database Select S.sname From Suppliers S Where S.sid NOT in (select C.sid from Catalog C where C.pid not in (Select p.pid from Parts P where P.color<>'blue')) Is it correct query for getting the name of supplier who have supplied a non blue part or it is returning something else
1 Resposta
+ 3
Preity Considering it's nearly 3am EDT, I may not be thinking most clearly... But your query seems to make sense and at first glance should work.
Have you attempted using outer joins and filtering on null matches instead?
That's the approach I would have gone.