SQL QUERIES
28- Get names of projects supplied by S1.
29- (Another Method) Get names of projects supplied by S1.
30- Get part numbers for parts supplied to any project in London.
.
.
SELECT jname FROM SPJ, J WHERE spj.jnum = j.jnum AND snum = 'S1';
SELECT jname FROM J WHERE EXISTS (SELECT * FROM SPJ WHERE spj.jnum = j.jnum AND snum = 'S1');
SELECT DISTINCT pnum FROM SPJ where jnum IN (SELECT jnum FROM J WHERE city='London');
SELECT DISTINCT jnum FROM SPJ WHERE pnum IN (SELECT pnum FROM SPJ WHERE snum = 'S1') ;
SELECT jnum FROM J WHERE NOT EXISTS ( SELECT * FROM SPJ WHERE j.jnum = spj.jnum AND snum <> 'S1');
Course Outline BSIT 2 year Program First Semester Outline Second Semester Outline Third Semester Outline ...
Post a Comment