Yurttas/PL/DBL/postgres/F/01/Bank/Borrower-cre.sql

 1/*
 2REM
 3REM
 4REM Borrower-cre.sql
 5REM
 6REM
 7*/
 8
 9SELECT current_schema();
10SET search_path to "bank";
11
12CREATE TABLE Borrower(branchname VARCHAR(16) NOT NULL,
13                      loannumber INTEGER NOT NULL,
14                      customername VARCHAR(16) NOT NULL,
15                      amount INTEGER,
16          PRIMARY KEY(loannumber),
17          FOREIGN KEY(branchname) REFERENCES Branch(branchname),
18          FOREIGN KEY(customername) REFERENCES Customer(customername));