The document outlines the creation of two SQL tables: 'departments' and 'employees', including their respective fields and primary keys. It also contains multiple INSERT statements to populate these tables with sample data for various departments and employees. The data includes details such as department names, employee names, job titles, salaries, and hire dates.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
22 views19 pages
SCHEMA1
The document outlines the creation of two SQL tables: 'departments' and 'employees', including their respective fields and primary keys. It also contains multiple INSERT statements to populate these tables with sample data for various departments and employees. The data includes details such as department names, employee names, job titles, salaries, and hire dates.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 19
CREATE TABLE departments (
department_id INT NOT NULL,
department_name VARCHAR(30) NOT NULL, manager_id INT , location_id INT , PRIMARY KEY (department_id) );
CREATE TABLE employees (
employee_id INT NOT NULL, first_name VARCHAR(20), last_name VARCHAR(25) NOT NULL, email VARCHAR(25) NOT NULL, phone_number VARCHAR(20), hire_date DATE NOT NULL, job_id VARCHAR(10) NOT NULL, salary DECIMAL(8 , 2 ) NOT NULL, commission_pct DECIMAL(2 , 2 ), manager_id INT , department_id INT, PRIMARY KEY (employee_id) );