SET

From InterBase

Go Up to isql Command Reference


Lists the status of the features that control an isql session.

SET;

Description: isql provides several SET commands for specifying how data is displayed or how other commands are processed.

The SET command, by itself, verifies which features are currently set. Some SET commands turn a feature on or off. Other SET commands assign values.

Many isql SET commands have corresponding SQL statements that provide similar or identical functionality. In addition, some of the isql features controlled by SET commands can also be controlled using isql command-line options. 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 are restored.

The isql SET statements are:

SET Statements
Statement Description Default

SET AUTODDL

Toggles the commit feature for DDL statements.

ON

SET BLOBDISPLAY <n>

Turns on the display of Blob type <n>; the parameter <n> is required to display Blob types.

OFF

SET COUNT

Toggles the count of selected rows on or off.

OFF

SET ECHO

Toggles the display of each command on or off.

OFF

SET LIST <string>

Displays columns vertically or horizontally.

OFF

SET NAMES

Specifies the active character set.

OFF

SET PLAN

Specifies whether or not to display the query plan of the optimizer.

OFF

SET STATS

Toggles the display of performance statistics on or off.

OFF

SET TERM <string>

Allows you to change to an alternate terminator character (deprecated in InterBase 7 and later).

;

SET TIME

Toggles display of time in DATE values.

ON

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.

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 are restored 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.

Notes:

  • You cannot enter isql SET statements interactively in the SQL Statement area of IBConsole isql. You can perform the same functions with menu items.
  • SET GENERATOR and SET TRANSACTION (without a transaction name) are DSQL statements and so you can enter them interactively in IBConsole isql or isql. These statements are not exclusively isql statements, so they are not documented in this chapter. See the Language Reference Guide for details.
  • SET DATABASE is exclusively an embedded SQL statement. See the Language Reference Guide and the Embedded SQL Guide for details.

Example: To display the isql features currently in effect, enter:

SET;
Print statistics: OFF
Echo commands: OFF
List format: OFF
Row count: OFF
Autocommit DDL: OFF
Access plan: OFF
Display BLOB type: 1
Terminator: ;
Time: OFF

The output shows that isql is set to not echo commands, to display Blob data if they are of subtype 1 (text), to automatically commit DDL statements, and to recognize a semicolon (;) as the statement termination character.

See Also