[ Home ]

SQL Crash Course cover

SQL Crash Course for Beginners
by Chris Kennedy

A newer edition is available.


This book’s examples use the sample database books, described in “The Sample Database” in Appendix A. To create books, download the zip file sql_crash_course_files.zip, expand it, and follow the instructions for your DBMS, listed below. The file readme.txt describes the distribution.

In addition to creating the tables described in “The Sample Database” in Appendix A, the SQL scripts create additional tables used in other examples. If you’re running a DBMS locally (that is, on your own computer), then you’re the database administrator (DBA) and have all the privileges you need. If you’re connecting to a DBMS on a network server, then ask your DBA for connection parameters and the privileges to create, query, update, and drop databases and tables.

The instructions for creating the sample database explain how to use simple tools and settings. As you gain experience, you might want to switch to using the statement CREATE DATABASE to create new databases. CREATE DATABASE is a powerful but nonstandard SQL command, so its syntax and capabilities vary by DBMS; see your DBMS’s documentation. (Microsoft Access doesn’t support CREATE DATABASE, but you can create Access databases programmatically by using Visual Basic for Applications or C#.)