Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » Database administration » SQL Anywhere graphical administration tools » Interactive SQL

 

SQL script files in Interactive SQL

SQL script files are text files that contain SQL statements and are useful 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.

When you edit a .sql file, Interactive SQL automatically creates a backup copy after:

  • You execute a statement.

  • The file has remained unchanged for 30 seconds.

If you are editing a file and Interactive SQL closes unexpectedly, you are prompted to recover the file the next time you start Interactive SQL.

 See also