Yurttas/PL/DBL/mssql/F/01/PC/q13.sql
Revision as of 04:35, 3 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">ββREM REM q13.sql REM REM Delete all Laptops made by a manufacturer that doesn't make REM printers. REM: DELETE FR...")
1/*
2REM
3REM q13.sql
4REM
5REM Delete all Laptops made by a manufacturer that doesn't make
6REM printers.
7REM
8*/
9
10DELETE FROM Product
11WHERE type='laptop'
12 AND maker NOT IN (SELECT maker
13 FROM Product
14 WHERE type='printer');
15
16DELETE FROM Laptop
17WHERE model NOT IN (SELECT model
18 FROM Product);