Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL #1

Open
beeclo9 opened this issue Oct 20, 2015 · 0 comments
Open

SQL #1

beeclo9 opened this issue Oct 20, 2015 · 0 comments

Comments

@beeclo9
Copy link
Owner

beeclo9 commented Oct 20, 2015

CREATE TABLE Employee
(
Eid INT NOT NULL PRIMARY KEY,
Elevel INT NOT NULL,
Elastname VARCHAR(15),
Efirstname VARCHAR(15),
Eaddress VARCHAR(20),
Epno INT,
Essn INT NOT NULL,

);

CREATE TABLE Account
(
Anumber INT NOT NULL PRIMARY KEY,
Abalance FLOAT(8) NOT NULL,

);

CREATE TABLE Customer
(
Cssn INT NOT NULL ,
Clastname VARCHAR(15),
Cfirstname VARCHAR(15),
Cbdate DATE NOT NULL,
Caddress VARCHAR(15),
Cpno INT,
Anumber INT NOT NULL,
FOREIGN KEY (Anumber) references Account(Anumber)
);

CREATE TABLE AccountStatement
(
Anumber INT NOT NULL PRIMARY KEY,
Smodate DATE,
Sbalance FLOAT(8),
Sdifference FLOAT(8),
Cssn INT NOT NULL
FOREIGN KEY (Anumber) references Account(Anumber)

);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant