Isql Set Statements

SET Statements are used to configure the ISQL environment from a script file. Changes to the session setting from SET statements in a script affect the session only while the script is running. After a script completes, the session settings prior to running the script will be restored.

You cannot enter ISQL SET statements interactively in the SQL Statement area. When using ISQL interactively, perform these same functions with the Session menu items. SET GENERATOR and SET TRANSACTION (without a transaction name) are SQL statements and so may be entered interactively. The ISQL SET statements are:

Table 5-1: SET Statements

Statement Description

Table 5-1: SET Statements

Statement Description

SET

AUTODDL

Toggles the commit feature for DDL statements.

SET

BLOBDISPLAY n

Turns on the display of BLOB type n. The parameter n is required to display BLOB types.

SET

COUNT

Toggles the count of selected rows on or off.

SET

ECHO

Toggles the display of each command on or off.

SET

LIST string

Displays columns vertically or horizontally.

SET

NAMES

Specifies the active character set.

SET

PLAN

Specifies whether or not to display the optimizer's query plan.

Table 5-1: SET Statements (Continued)

Statement

Description

SET STATS

Toggles the display of performance statistics on or off.

SET TERM string

Allows you to change to an alternate terminator character(s).

SET TIME

Toggles display of time in DATE values.

By default all settings are initially OFF except AUTODDL and TIME, and the terminator is a semicolon (;). Each time you start an ISQL session or execute an ISQL script file, settings begin with their default values.

After an ISQL script completes, the settings return to their values before the script was run. So you can modify the settings for interactive use, then change them as needed in an ISQL script, and after running the script they automatically return to their previous configuration.

The statements SET DATABASE, SET GENERATOR, and SET TRANSACTION are not exclusively ISQL commands, so they are not documented in this chapter. For more information about these commands, see the Language Reference.

+1 0

Post a comment