Executing command files

Command files are text files that contain SQL statements, and are useful if you want to run the same SQL statements repeatedly. You can use Interactive SQL to open, view, run, and save command files.

You can execute command files in any of the following ways from Interactive SQL:

  • You can use the Interactive SQL READ statement to execute command files. For example, the following statement executes the file temp.sql:

    READ temp.sql;
  • You can load a command file into the SQL Statements pane and execute it directly from there.

    You load command files into the SQL Statements pane by choosing File » Open. Enter the file name, for example temp.sql, when prompted.

  • You can run a command file without loading it by choosing File » Run Script.

  • You can supply a command file as a command line argument for Interactive SQL.

See Run SQL command files in Interactive SQL.