Home | Previous Page | Next Page  

Appendix B. Demonstration SQL

This appendix shows the contents of the various command files that are available with DB–Access. These command files all have the extension .sql when displayed from the command line but appear without the extension on the SQL CHOOSE menu.

Keywords in these command files are shown in uppercase letters to make the SQL statements easier to read. Keywords in the actual command files are lowercase.

Important:
Although the command files are listed alphabetically in this appendix, you cannot execute the command files that create tables in that order without causing errors. The order in which the tables are created is very important because of the referential constraints that link those tables.

When you select the Choose option on the SQL menu, the CHOOSE screen appears. It displays a list of the command files that you can access, similar to the display that Figure 122 shows. These files are included with the stores_demo database. Other .sql files are discussed later in this appendix.

Figure 122. Command Files Listed on the CHOOSE Screen
CHOOSE >>   
Choose a command file with the Arrow Keys, or enter a name, then press Return.

----------------- stores_demo @dbserver1 -------------- Press CTRL-W for Help ------

alt_cat             c_state            d_trig             sel_ojoin1

c_calls             c_stock            d_view             sel_ojoin2

c_cat               c_stores_demo      del_stock          sel_ojoin3

c_custom            c_table            ins_table          sel_ojoin4

c_index             c_trig             opt_disk           sel_order

c_items             c_type             sel_agg            sel_sub

c_manuf             c_view1            sel_all            sel_union

c_orders            c_view2            sel_group          upd_table

c_proc              d_proc             sel_join

If you do not see the command files included with your demonstration database, check the following:

  1. Did you copy the demonstration SQL command files to your current directory when you ran the demonstration database initialization script? If not, you can rerun the initialization script to copy them.
  2. Did you start DB–Access from the directory in which you installed the demonstration SQL command files? If not, exit DB–Access, change to the appropriate directory, and start DB–Access again.

For instructions on running the initialization script, copying command files, and starting DB–Access, refer to Getting Started with DB-Access.

Use these command files with DB–Access for practice with SQL and the demonstration database. You can rerun the demonstration database initialization script whenever you want to refresh the database tables and SQL files.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]