APPENDIX CCode Examples to Populate Tables

This appendix contains the INSERT statements used to populate the sample tables with data. To populate the tables that you created based on Appendix B, “Code Examples to Create Tables,” simply log in to your database as the user (schema) who owns the tables created from Appendix B and execute these commands. If you are using MySQL, you might need to issue the use database command to ensure that you are working in the correct database.

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

Unless specified by the words Oracle only, these INSERT statements work in both ...

Get Sams Teach Yourself SQL in One Hour a Day, Fifth Edition now with O’Reilly online learning.

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