Contents IndexUsing Sybase Central to work with database objects Working with databases

User's Guide
   Part III. Using SQL Anywhere
     Chapter 17. Working with Database Objects
      Using ISQL to work with database objects

ISQL is a utility for entering SQL statements, supplied with SQL Anywhere. If you are using ISQL to work with your database schema, instead of executing the SQL commands one at a time, you should build up the set of commands in an ISQL command file. This file can then be executed in ISQL to build the database.

If you are using a tool other than ISQL, all the information in this chapter concerning SQL statements still applies.

If you have not created your database using command files, you can create a command file that would recreate your database by unloading the database.

  For a description of the DBUNLOAD utility, see "The Unload utility".

ISQL command file

An ISQL command file is a text file with semicolons placed at the end of commands (see the chapter "Command Files") as shown below.

     CREATE TABLE t1 ( .. );
     CREATE TABLE t2 ( .. );
     CREATE INDEX i2 ON t2 ( .. );
     ..

An ISQL command file is usually given a name with the extension SQL. To create your database using a command file, you can either paste it into the ISQL command window (for files with less than 500 lines), or execute the saved command file by entering a command to read the file into the ISQL command window. For example:

     read makesdb

will read the ISQL commands in the file MAKEDB.SQL.

Contents IndexUsing Sybase Central to work with database objects Working with databases