FirebirdSQL logo

OUTput

OUTput [filename]

This command redirects all output that normally is displayed on the screen, to a specific file.If a filename is supplied, all subsequent output goes to that file and is not displayed on screen.If no filename is supplied, output is once more redirected to the screen.

SQL> output test.log;

SQL> show tables;

SQL> output;

SQL> shell;

$ cat test.log

       COUNTRY                                CUSTOMER
       DEPARTMENT                             EMPLOYEE
       EMPLOYEE_PROJECT                       FRED
       JOB                                    PROJECT
       PROJ_DEPT_BUDGET                       SALARY_HISTORY
       SALES

SET

There are a number of settings and options that can be changed to suit how you wish isql to operate.These settings are changed by the set command which is discussed below.

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