Idiots Guides Downloads
3D Printing
Art of Songwriting
Bridge
Business Plans Plus
Chemistry
Conducting Music
Conversational Japanese
Dreamweaver
Estate Planning
Everyday Makeup Secrets
GED Crash Course
Getting Published
Grant Writing
Guitar Exercises
Guitar Theory
Homebrewing
HTML 5 & CSS 3
Introductory Accounting
Judaism
Learning German
Learning Italian
Leather Crafts
Low Carb Meals
Low Sodium Cooking
Making Metal Jewelry
Making Natural Beauty Products
Meditation
Middle East Conflict
Mindfulness
Music Theory
Overcoming Type 2 Diabetes
Piano Exercises
Playing Bass Guitar
Playing Drums
Playing Guitar
Playing Harmonica
Playing Ukulele
Quilting
Quinoa Cookbook
Raspberry Pi
RV Vacations
Saltwater Aquariums
Self Hypnosis
Singing
SQL
Starting Your Own Business
Statistics
Surviving Divorce
T'ai Chi & QiGong
Technical Analysis
TOEFL
Zen doodling

SQL

Use these SQL statements to create the Employees table in the Corporation database that we'll use as a sample database (Note: if your DBMS does not support the USE statement to make Corporation the default database, just qualify the name of the table as Corporation.Employees instead and ignore the USE Corporation; line):

CREATE DATABASE Corporation;

USE Corporation;

CREATE TABLE Employees
(firstname VARCHAR(20), 
lastname VARCHAR(20), 
department VARCHAR(20), 
hiredate DATE, 
supervisor INT CHECK (supervisor > 1000 AND supervisor < 2000),
id INT PRIMARY KEY CHECK (id > 1000 AND id < 3000));

INSERT INTO Employees VALUES ("John", "Wood", "Sales", "20120115", 1001, 1501);

INSERT INTO Employees VALUES ("Mary", "Green", "Sales", "20120115", 1501, 1601);

INSERT INTO Employees VALUES ("Daniel", "Grant", "Sales", "20120115", 1501, 1602);

INSERT INTO Employees VALUES ("Nancy", "Jackson", "Accounting", "20120220", 1501, 1701);

INSERT INTO Employees VALUES ("Tom", "Smith", "Accounting", "20120315", 1701, 1801);

INSERT INTO Employees VALUES ("Jessica", "Smith", "Accounting", "20120315", 1701, 1901);