Appendix D. CREATE TABLE Statements for Book Examples

This appendix is useful because it not only lists the CREATE TABLE statements used in the examples, but also gives you some of the syntax differences among the various database platforms. You can use these statements to create your own tables for performing hands-on exercises.

MySQL

EMPLOYEE_TBL

CREATE TABLE EMPLOYEE_TBL(EMP_ID              VARCHAR(9)       NOT NULL,LAST_NAME           VARCHAR(15)      NOT NULL,FIRST_NAME          VARCHAR(15)      NOT NULL,MIDDLE_NAME         VARCHAR(15),ADDRESS             VARCHAR(30)      NOT NULL,CITY                VARCHAR(15)      NOT NULL,STATE               CHAR(2)          NOT NULL,ZIP                 INTEGER(5)       NOT ...

Get Sams Teach Yourself SQL in 24 Hours, Fifth 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.