Yurttas/PL/DBL/postgres/F/01/Movies/StarsIn-cre.sql

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 REM StarsIn-cre.sql REM REM: SELECT current_schema(); SET search_path to "movies"; CREATE TABLE StarsIn...")
(diff) ← Older revision | Latest revision (diff) | Newer revision β†’ (diff)
 1/*
 2REM
 3REM
 4REM StarsIn-cre.sql
 5REM
 6REM
 7*/
 8
 9SELECT current_schema();
10SET search_path to "movies";
11
12CREATE TABLE StarsIn(title VARCHAR(24) NOT NULL,
13                     year INTEGER NOT NULL,
14                     name VARCHAR(24) NOT NULL,
15         PRIMARY KEY(title, year, name),
16         FOREIGN KEY(title, year) REFERENCES Movie(title, year),
17         FOREIGN KEY(name) REFERENCES MovieStar(name));