Yurttas/PL/DBL/postgres/F/01/Company-A/Department-cre.sql
1/*
2REM
3REM
4REM Department-cre.sql
5REM
6REM
7*/
8
9SELECT current_schema();
10SET search_path to "companya";
11
12CREATE TABLE Department(dname VARCHAR(16) NOT NULL,
13 dnumber INTEGER NOT NULL,
14 mgrssn CHAR(9) NOT NULL,
15 mgrstartdate CHAR(9),
16 PRIMARY KEY(dnumber),
17 FOREIGN KEY(mgrssn) REFERENCES Employee(ssn));