SQL script files in Interactive SQL

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

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

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

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

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

  • You can run a script file without loading it by clicking File » Run Script.

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

 See also