Appendix E SQL Script to Create the Tables in This Book

This appendix provides the SQL script to create and populate 16 of the tables used in the examples throughout the book. To create and populate a single table, run the Create Table script. Next, delete the Create Table script and copy, paste, and run each INSERT statement one at a time.

Note: In Microsoft Access, each time you insert a new record, a message will display telling you that you are about to append one record. Click Yes in response to this message.

Create and Populate the Activities Table

CREATE TABLE Activities(ActivityID NUMBER CONSTRAINT ActID PRIMARY KEY,ActivityName CHAR (50) NOT NULL,StartDate DATE,EndDate DATE);INSERT INTO Activities (ActivityID, ActivityName, StartDate, ...

Get SQL for Microsoft Access, 2nd 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.