Created
August 29, 2016 06:11
-
-
Save abadongutierrez/439fef2fd9caa719b3fc8d2e1846f7ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE department | |
( | |
department_id serial NOT NULL, | |
name text NOT NULL, | |
PRIMARY KEY (department_id) | |
); | |
CREATE TABLE employee | |
( | |
employee_id serial NOT NULL, | |
first_name text NOT NULL, | |
last_name text NOT NULL, | |
hire_date date NOT NULL, | |
department_id integer NOT NULL, | |
FOREIGN KEY (department_id) REFERENCES department (department_id) ON UPDATE NO ACTION ON DELETE NO ACTION, | |
PRIMARY KEY (employee_id) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment