Yurttas/PL/DBL/postgres/F/01/Movies/q08.sql

From ZCubes Wiki
Revision as of 00:46, 5 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">/* REM REM q08.sql REM REM Modify the relation MovieExec(name, address, REM cn, networth) by prepending the title Pr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1/*
 2REM
 3REM q08.sql 
 4REM
 5REM Modify the relation MovieExec(name, address, 
 6REM cn, networth) by prepending the title Pres.  
 7REM in front of every movie executive who is 
 8REM the president of a studio.
 9REM
10*/
11
12SELECT current_schema();
13SET search_path to "movies";
14
15UPDATE MovieExec
16SET name = 'Pres. ' || name
17WHERE cn IN (SELECT presCN
18             FROM Studio);