Yurttas/PL/DBL/postgres/F/01/Bank/Depositor-cre.sql
Revision as of 00:37, 5 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">→REM REM REM Depositor-cre.sql REM REM: SELECT current_schema(); SET search_path to "bank"; CREATE TABLE Deposit...")
1/*
2REM
3REM
4REM Depositor-cre.sql
5REM
6REM
7*/
8
9SELECT current_schema();
10SET search_path to "bank";
11
12CREATE TABLE Depositor(branchname VARCHAR(16) NOT NULL,
13 accountnumber INTEGER NOT NULL,
14 customername VARCHAR(16) NOT NULL,
15 balance INTEGER,
16 PRIMARY KEY(accountnumber),
17 FOREIGN KEY(branchname) REFERENCES Branch(branchname),
18 FOREIGN KEY(customername) REFERENCES Customer(customername));