Home | Previous Page | Next Page   The Query-language Option >

Running an SQL Statement

After you exit the editor screen, the SQL menu reappears with the Run option highlighted and the statement text displayed in the bottom of the screen, as Figure 11 shows.

Figure 11. The SQL Menu with SQL Statement Text Ready to Run
SQL:  New   Run   Modify  Use-editor  Output  Choose  Save  Info  Drop  Exit
Run the current SQL statements.

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

CREATE TABLE mystock
   (
   stock_num         SMALLINT,
   manu_code         CHAR(3),
   description       CHAR(15),
   unit_price        MONEY(6),
   unit              CHAR(4),
   unit_descr        CHAR(15),
   PRIMARY KEY (stock_num, manu_code) CONSTRAINT  stock_man_primary,
   FOREIGN KEY (manu_code) REFERENCES manufact
   )

Press RETURN or the R key to select the Run option. DB–Access first checks each statement to ensure that it conforms to the SQL syntax and usage rules. If your statements contain no syntax mistakes, DB–Access processes them.

Tip:
You can check your SQL statements for ANSI compatibility if you set the DBANSIWARN environment variable or invoke DB–Access with the -ansi option.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]