Appendix B. Sample Table Scripts

As you follow each lesson in this book, you are strongly encouraged to try out each example on your own MySQL server.

The tables used by the examples throughout the book are created using the following SQL script. The script contains CREATE TABLE statements that define each table and some INSERT statements to populate the tables with their initial values.

Sample Database

You can download the SQL file printed here from the Sams Publishing website at http://www.samspublishing.com.

 DROP TABLE IF EXISTS customers; CREATE TABLE customers ( customer_code VARCHAR(10) NOT NULL, name VARCHAR(40) NOT NULL ); INSERT INTO ...

Get Sams Teach Yourself MySQL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.