Changing the SQL statement terminator

By default, the SQL and XQuery editor uses a semicolon ( ; ) as the default statement terminator. You can change the default statement terminator or specify a different statement terminator for the SQL statements in a script that you create in the SQL and XQuery editor.

Before you begin

The SQL script for which you want to change the statement terminator must be open in the SQL and XQuery editor.

About this task

A script can have multiple statement terminator commands. A statement terminator applies to all of the SQL statements that follow it, until the next statement terminator command is encountered. You can specify different statement terminators in different SQL scripts.

The statement terminator that you specify in an SQL script persists every time that you open the script in the SQL and XQuery editor.

Procedure

To change the statement terminator for the SQL statements in an SQL script:

Results

If you specify a statement terminator other than the default, a special comment statement is added to the top of the SQL script that indicates the statement terminator that you specified. For example, if you specified the terminator using the command pane or the pop-up menu, the comment looks like this:
--<ScriptOptions statementTerminator = "x"/>

Existing occurrences of the default statement terminator are not updated in the SQL script; you must change them manually.


Feedback