I HAVE THREE TABLES
TABLE S(SID, SNAME,ADDRESS)
SID IS PRIMARY KEY
PID IS PRIMARY KEY
PRIMARY KEY: SID+PID
REFERENCE KEY : SID REFERENCES S.SID
: PID REFERENCES P.PID
I WANT THE SNAME OF SUPPLIERS WHO SUPPLY EVERY PART
I AM TRYING
SELECT S.SNAME,S.SID,P.PID FROM S INNER JOIN CAT C
ON s.sid=c.sid CROSS JOIN P WHERE P.PID=C.PID
AFTER THE WHERE WHICH CONDITION I HAD TO PUT IS A LITTLE BIT CONFUSED PLZ HELP
some parts are supplied by more than one supplier, okay so far?
okay, now, some suppliers are located in london, yes?
now, consider the suppliers in london, and consider all the parts they supply... now eliminate the parts that are also supplied by some other supplier who is not in london, and what you're left with is the parts that are supplied by a london supplier and by no one else