APPENDIX BCode Examples to Create Tables

This appendix contains the CREATE TABLE statements for the tables that we used for examples in this book. To create these tables in your database, simply log in to your database as a valid user and then execute each of these commands.

Note that the exact syntax of some implementations of SQL may vary slightly from this code. This is basic SQL code to create tables; the implementations used are Oracle and MySQL.

The CREATE TABLE statements are as follows:

image

image

Get Sams Teach Yourself SQL in One Hour a Day, 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.