Interactive SQL

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).

Note: 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.

If you use a tool other than Interactive SQL, all the information in these topics concerning SQL statements still applies.

Interactive SQL Command File

An Interactive SQL 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 ( .. );
An Interactive SQL command file usually carries the extension .sql. To execute a command file, either paste the contents of the file into the Interactive SQL 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 READ statement:
read makedb
reads the Interactive SQL commands in the file makedb.sql.
Related concepts
Cannot Write to a Locked Table
How Locking Works
Managing Write Lock Contention on a Table