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 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.