Welcome to Today's Tables

For the examples today, we have used several of Oracle's data dictionary (system catalog) views and several tables that we created ourselves. Following are the CREATE TABLE statements for the tables that we have defined for this chapter.

 CREATE TABLE EMP_TBL (EMP_ID CHAR(9) NOT NULL, LAST_NAME VARCHAR(15) NOT NULL, FIRST_NAME VARCHAR(15) NOT NULL, MIDDLE_NAME VARCHAR(15) NULL, ST_ADD VARCHAR(20) NOT NULL, CITY VARCHAR(20) NOT NULL, ST CHAR(2) NOT NULL, ZIP VARCHAR(5) NOT NULL, HOME_PH VARCHAR(10) NULL, EMER_CONT VARCHAR(30) NULL, EMER_PH VARCHAR(10) NULL, CONSTRAINT EMP_PK PRIMARY KEY (EMP_ID)); CREATE TABLE EMP_PAY_TBL (EMP_ID CHAR(9) NOT NULL, DT_START DATE NOT NULL, POSITION VARCHAR(15) NOT NULL, SALARY DECIMAL(8,2) ...

Get Sams Teach Yourself SQL in 21 Days, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.