Yurttas/PL/DBL/oracle/F/01/SPJ/q14.sql

From ZCubes Wiki
Revision as of 23:13, 4 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div"> REM REM q14.sql REM REM Construct a table containing a list of project numbers REM for projects that are either locat...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1REM
 2REM q14.sql
 3REM
 4REM Construct a table containing a list of project numbers
 5REM for projects that are either located in 'London' or are
 6REM supplied by a 'London' supplier.
 7REM
 8
 9CREATE TABLE LondonProjs (JN VARCHAR2(4));
10    
11INSERT INTO LondonProjs
12(SELECT T.JN
13 FROM Shipments T, Suppliers S
14 WHERE T.SN = S.SN
15   AND S.CITY = 'London')
16UNION
17(SELECT JN
18 FROM Projects
19 WHERE CITY = 'London');