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 statements in Interactive SQL

 

Executing SQL statements (Interactive SQL)

You can execute multiple SQL statements from Interactive SQL as long as each statement ends with a command delimiter.

Prerequisites

There are no prerequisites for this task.

Context and remarks

The command delimiter is set with the command_delimiter option and is a semicolon (;) by default. An alternative to using the semicolon is to enter the separator go on a line by itself, at the beginning of the line.

 Task
  1. In Interactive SQL, type your queries in the SQL Statements pane.

  2. Choose one of the following options to execute the SQL statements:

    Option Action
    Execute all SQL statements

    Press F5, or click SQL » Execute to execute all statements.

    Execute selected SQL statements

    Select the statements, then press F9, or click SQL » Execute Selection to execute the selected statements.

    Execute SQL statements one at a time

    Place your cursor in the statement that you want to execute, then press Shift+F9, or click SQL » Single Step to execute the statement.

Results

The SQL statement(s) are executed as specified. The result set appears on the Results tab in the Results pane. Interactive SQL shows the first result set of the most-recently executed statement. By default, row numbers appear to the left of the result set.

Next

You can permanently configure the Execute Statements toolbar button to execute all or selected statements.

Click Tools » Options » Toolbar. Select one of the following options:

  • To execute all SQL statements, click Execute. This is the default setting.

  • To execute only the selected SQL statements, click Execute Selection.

 See also