Interactive SQL (dbisql) is a utility for entering SQL statements. If you use Interactive SQL to work with your database schema, instead of executing the SQL statements one at a time, build up the set of commands in a dbisql command file. Then you can execute this file in dbisql to build the database.
The definitions of the database objects form the database schema. You can think of the schema as an empty database.The SQL statements for creating and modifying schemas are called the data definition language (DDL).
Only one user at a time can perform DDL statements on a table. IQ locks a table during DDL operations on it. Users may, however, perform DDL on other objects in the same database at the same time. For more information, see “How locking works”.
If you use a tool other than dbisql, all the information in this chapter concerning SQL statements still applies.
A dbisql command file is a text file with semicolons placed at the end of commands as shown below.
CREATE TABLE t1 ( .. ); CREATE TABLE t2 ( .. ); CREATE LF INDEX i2 ON t2 ( .. ); ..
A dbisql command file usually carries the extension .sql. To execute a command file, either paste the contents of the file into the dbisql command window (if the file has less than 500 lines) or enter a command that reads the file into the command window. For example, the command:
read makedb
reads the dbisql commands in the file makedb.sql.
For more information about reading a file into the command window, see READ statement [DBISQL] in Reference: Statements and Options.