FirebirdSQL logo

Isql Set Commands

As explained in [isql-commands], you may enter the help set command to drill down into the various options available for the set command.These are all discussed below.Note that the output from the help set command only lists isql-specific commands;it does not list the set transaction statement and other Firebird statements that start with set.The help set command produces the following output (from Firebird 5.0):

SQL> help set;
Set commands:
    SET                    -- display current SET options
    SET AUTOddl            -- toggle autocommit of DDL statements
    SET BAIL               -- toggle bailing out on errors in non-interactive mode
    SET BLOB [ALL|<n>]     -- display BLOBS of subtype <n> or ALL
    SET BLOB               -- turn off BLOB display
    SET COUNT              -- toggle count of selected rows on/off
    SET MAXROWS [<n>]      -- limit select stmt to <n> rows, zero is no limit
    SET ECHO               -- toggle command echo on/off
    SET EXPLAIN            -- toggle display of query access plan in the explained form
    SET HEADING            -- toggle display of query column titles
    SET KEEP_TRAN_params   -- toggle to keep or not to keep text of following successful SET TRANSACTION statement
    SET LIST               -- toggle column or table display format
    SET NAMES <csname>     -- set name of runtime character set
    SET PER_TABle_stats    -- toggle display of detailed per-table statistics
    SET PLAN               -- toggle display of query access plan
    SET PLANONLY           -- toggle display of query plan without executing
    SET SQL DIALECT <n>    -- set sql dialect to <n>
    SET STATs              -- toggle display of performance statistics
    SET TIME               -- toggle display of timestamp with DATE values
    SET TERM <string>      -- change statement terminator string
    SET WIDTH <col> [<n>]  -- set/unset print width to <n> for column <col>

All commands may be abbreviated to letters in CAPitals
Note

In the above, the BLOB commands only show the abbreviated form to save space, the full form is BLOBdisplay.In the following descriptions of the various set commands, we will use the full BLOBdisplay version of the appropriate commands.

The last line of the above output indicates that these commands can be abbreviated to the letters in capitals.

SET

The set command, without parameters, displays the current settings, as the following example from Firebird 4.0 shows:

SQL> set;
Print statistics:        OFF
Print per-table stats:   OFF
Echo commands:           OFF
List format:             OFF
Show Row Count:          OFF
Select maxrows limit:    0
Autocommit DDL:          ON
Access Plan:             OFF
Access Plan only:        OFF
Explain Access Plan:     OFF
Display BLOB type:       1
Column headings:         ON
Terminator:              ;
Time:                    OFF
Warnings:                ON
Bail on error:           OFF
Local statement timeout: 0
Keep transaction params: ON
    SET TRANSACTION

SET HEADING

SET HEADING [ON | OFF]

This command turns the display of column headings on or off as desired.If no parameter is supplied to the command, it toggles the current state of the heading display.

The heading display setting only affects the tabular display (list off) of query results.The list display (list on) always includes the column names.

SQL> set heading off;

SQL> select count(*) from employee;

          42

SQL> set heading on;

SQL> select count(*) from employee;

       COUNT
============
          42

SET KEEP_TRAN_params

Added in

Firebird 3.0.6 / 4.0

SET KEEP_TRAN_params [ON | OFF]

This command configures whether isql remembers the transaction configuration of the last SET TRANSACTION and applies it for implicitly started transactions.The default is ON in Firebird 4.0 and higher, and OFF in Firebird 3.0 (introduced in 3.0.6).If no parameter is supplied to the command, it toggles the current state of keep transaction parameters.

When set to ON, isql keeps the complete SQL text of the last successful SET TRANSACTION statement.New transactions are started — when started implicitly — using the same SQL text (instead of the default CONCURRENCY WAIT mode).When set to OFF, isql starts new transactions as usual.The name KEEP_TRAN can be used as a shorthand for KEEP_TRAN_PARAMS.