Yurttas/PL/DBL/postgres/F/01/Company-B/Works-cre.sql

From ZCubes Wiki
Revision as of 00:44, 5 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">→‎REM REM REM Works-cre.sql REM REM: SELECT current_schema(); SET search_path to "companyb"; CREATE TABLE Works(e...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1/*
 2REM
 3REM
 4REM Works-cre.sql
 5REM
 6REM
 7*/
 8
 9SELECT current_schema();
10SET search_path to "companyb";
11
12CREATE TABLE Works(employeename VARCHAR(16) NOT NULL,
13                   companyname VARCHAR(24) NOT NULL,
14                   salary INTEGER,
15       PRIMARY KEY(employeename, companyname),
16       FOREIGN KEY(employeename) REFERENCES Employee(employeename),
17       FOREIGN KEY(companyname) REFERENCES Company(companyname));