|
SQL: Visual QuickStart Guide, Third EditionOpening the Sample Database - Microsoft Access |
To open books in Microsoft Access 2000, 2002, or 2003:
- Choose File > Open; navigate to and select
books.mdb; then click Open. - To inspect the tables, click Tables (below Objects) in the Database window.
- To run SQL statements against
books, see "Microsoft Access" in Chapter 1.
To open books in Microsoft Access 2007 or later:
-
In Access 2007, choose Microsoft Office Button > Open.
or
In Access 2010, choose File > Open. - Navigate to and select
books.mdb; then click Open. - To inspect the tables, press F11 to show the Navigation pane. Click the menu at the top of the pane and choose Object Type; then click the menu again and choose Tables (or All Access Objects).
- To run SQL statements against
books, see "Microsoft Access" in Chapter 1.
If you're running Access 97 or earlier, you won't be able to open books.mdb because it's an Access 2000-format file. To create the sample-database tables, use the Import Text wizard to import the CSV files included in the distribution. A CSV (comma-separated values) file is a text file in which each column value is separated by a comma from the next column's value and each row starts a new line. The first row contains column names. The CSV files for the various tables are named csv_authors.txt, csv_publishers.txt, and so on.
To import a CSV file as a table:
- In Access, open or create a database, or press F11 to switch to the Database window for the open database.
- Choose File > Get External Data > Import.
- In the Import dialog box, in the Files of Type box, select Text Files.
- Navigate to the drive and folder where the CSV file is located; then double-click its icon.
- Follow the onscreen instructions in the Import Text wizard. Click Advanced to create or use an import/export specification. (To cancel importing, press Ctrl+Break.)