Overview

The input pane of a database console opens as a separate editor tab.
This is where you compose your
SQL statements.

When you
execute your first statement
(),
the Database Console tool window opens.
If the executed statement retrieves data (e.g. SELECT),
there are two panes in the tool window
shown on the Output and the Result tabs.
(The tab showing retrieved data may be labeled Result # or,
if appropriate, the table name may be shown.)

Otherwise, only the output pane is shown.

Additionally, you can open the Parameters pane ()
to manage parameters in
SQL statements.

Input pane

Use the input pane to compose and execute your SQL statements as well as to perform other, associated tasks.

The available functions are accessed by means of the toolbar icons, keyboard shortcuts and context menu commands.

Use this icon to open the Database page of the Settings dialog
to view or edit the settings for
your database consoles,
the Table Editor and the Database tool window.

Auto-commit

Use this check box
to turn the autocommit mode for the database connection on or off.

In the autocommit mode, each SQL statement is executed in its own transaction that is implicitly committed.
Consequently, the SQL statements executed in this mode cannot be rolled back.

If the autocommit mode is off, transactions are committed or rolled back explicitly by means of
the commit or rollback command.
Each commit or rollback starts a new transaction which provides grouping
for a series of subsequent SQL statements.

In this case, the data manipulations in the transaction scope are committed or rolled back all at once
when the transaction is committed or rolled back.

Commit

If the autocommit mode is off,
use this icon
to commit the current transaction.

Rollback

If the autocommit mode is off,
use this icon
to roll back the current transaction.

Cancel Running Statements

Ctrl+F2

Use this icon or shortcut to terminate execution of the current
statement or statements.

<schema>

A list for selecting the default schema or database (may be unavailable).

Most useful context menu commands

Execute Selection

Use this command to execute precisely what is selected (highlighted) in the input pane.
In this way, you can execute only part of a statement, for example, a subquery.

If nothing is currently selected in the input pane, the current statement is executed.

Change '<current_dialect_name>' dialect to

Use this command to change the SQL dialect being used. Select the necessary dialect from the list.

In addition to particular dialects, also the following option is available:

<Generic>.
Basic
SQL92-based
support
is provided including completion and highlighting for SQL keywords, and
table and column names.
Syntax error highlighting is not available. So
all the statements in the input pane
are always shown as syntactically correct.

Use this icon to restore the original tool window layout
(after the rearrangements that you have made).

Cancel Running Statements

Ctrl+F2

Use this icon or shortcut to terminate execution of the current
statement or statements.

Close

Ctrl+Shift+F4

Use this icon or shortcut to close the
database console
(i.e. the corresponding editor tab and the tool window).

Output pane

This pane shows
the SQL statements that you have run as well as information about other operations performed in the console.
These include turning the autocommit mode on or off, committing or rolling back a transaction, etc.

The information about the errors that occur is also shown in this pane.

For each of the events
(i.e. statements, other operations and errors),
the following information is provided:

Timestamp, that is, when the event took place.

For data definition and data manipulation operations -
how many rows were affected
(e.g. added, changed or deleted).
For data retrieval operations - how many rows were retrieved.

Duration in milliseconds.
If the
statement
execution involves processing the data received from the database,
the execution time is shown as x/y ms, where x
is the time taken to receive the data, and y is the total time of generating
the query result which includes both receiving and processing the data.

Use the following context menu commands:

Copy (Ctrl+C)
to copy the text selected in the output pane to the clipboard.

Compare with Clipboard to compare the text selected in the output pane with
the contents of the clipboard.

Clear All to clear all the contents of the output pane.

Result pane

This pane shows the data retrieved from the database in table format.
You can sort, add, edit and remove the data as well as perform other, associated tasks.

Main functions.
Most of the functions
in the Result pane
are accessed by means of controls on the
toolbar,
context menu commands for the data cells, and associated keyboard shortcuts.

Item

Shortcut

Description

,
,
and

These icons and corresponding commands are for switching between the result set pages,
i.e. the pages that show the
retrieved data.

A fixed number of rows shown simultaneously is referred to as a result set page.
If this number is less than the number of rows
that satisfy the query,
only a subset of all the rows is shown at a time.

In such cases, you can use
,
,
and
to switch between the subsets.
(If all the rows are currently shown, these icons and the corresponding commands are inactive.)

The result set page size is set on the Database page of
the Settings dialog.

First Page

Use this icon or command to switch to the first of the result set pages
to see the first series of rows.

Previous Page

Ctrl+Alt+Up

Use this icon, command or shortcut to switch to the previous result set page
to see the previous series of rows.

Next Page

Ctrl+Alt+Down

Use this icon, command or shortcut to switch to the next result set page
to see the next series of rows.

Last Page

Use this icon or command to switch to the last of the result set pages
to see the last series of rows.

Reload Page

Ctrl+R

Use this icon, command or shortcut to refresh the current table view.
Use this function to:

Use this icon, command or shortcut to delete the selected row or rows.

Rows are selected by clicking the cells in the column where the row numbers are shown.
To select more than one row,
use mouse clicks in combination with the Ctrl key.

If inappropriate in the current context (i.e. for the table currently shown),
this function is not available.

Auto-commit

Use this check box
to turn the autocommit mode for the database connection on or off.

In the autocommit mode, each SQL statement is executed in its own transaction that is implicitly committed.
Consequently, the SQL statements executed in this mode cannot be rolled back.

(Each change of a value in the table, or adding or deleting a row results in executing an SQL statement.)

If the autocommit mode is off, transactions are committed or rolled back explicitly by means of
the commit or rollback command.
Each commit or rollback starts a new transaction which provides grouping
for a series of subsequent SQL statements.

In this case, the data manipulations in the transaction scope are committed or rolled back all at once
when the transaction is committed or rolled back.

Commit

If the autocommit mode is off,
use this icon
or command
to commit the current transaction.

Rollback

If the autocommit mode is off,
use this icon
or command
to roll back the current transaction.

Cancel Query

Ctrl+F2

Use this icon or shortcut to terminate execution of the current
query.

Pin Tab

Use this icon or command to pin the tab to the tool window to keep the query result.

Use this button or command to open a menu in which you can select an active data extractor.
The Configure Extractors command in that menu opens
the Data Extractors dialog that lets you
manage the data extractors and their settings.

(A data extractor is a named set of settings that define how to convert table data into CSV, TSV and other formats.)

View Query

Use this button to view the query which was used to generate the
table.
To close the pane where the query is shown, press Escape.

This icon provides access to the following commands:

Transpose. Use this command to turn the transposed table view on or off.
(In the transposed view, the rows and columns are interchanged.
So, the rows are shown as columns and vice versa.)

Reset View.
Use this command to restore the initial table view after reordering or hiding the columns,
or sorting the data.

Settings.
Use this command to open the Database page of the Settings dialog
to view or edit the settings for
the Database console,
the Table Editor and the Database tool window.

Clone Row

Ctrl+D

Use this command or shortcut to create a copy of the selected row.

Edit Value

F2

Use this command or shortcut to start editing a value in the selected table cell.
(Alternatively, you can double-click the cell or simply start typing.)

If only a subset of corresponding rows is currently shown,
all the appropriate rows are copied to the clipboard anyway.
(The number of rows currently shown may be limited by the Result set page size parameter.)

Save All To File

Use this command to save the table data in a file.
In the dialog that opens, specify the location and name of the file.

If only a subset of corresponding rows is currently shown,
all the appropriate rows are saved in a file anyway.
(The number of rows currently shown may be limited by the Result set page size parameter.)

Save LOB

Use this command to save the large object
(LOB) currently selected in the table in a file.

Using the header row. In the Result pane, you can use
the cells in the header row (i.e. the row where column names are shown) for:

You can sort table data by any of the columns by clicking the cells in the header row.

Each cell in this row has a sorting marker in the right-hand part and, initially,
a cell may look something like this: .
The sorting marker in this case indicates that the data is not sorted by this column.

If you click the cell once, the data is sorted by the corresponding column in the ascending order.
This is indicated by the sorting marker appearance: .
The number to the right of the marker (1 on the picture) is the sorting level.
(You can sort by more than one column. In such cases, different columns will have different sorting levels.)

When you click the cell for the second time, the data is sorted in the descending order.
Here is how the sorting marker indicates this order: .

Finally, when you click the cell for the third time, the initial state is resorted.
That is, sorting by the corresponding column is canceled: .

Here is an example of a table where data are sorted by two of its columns.

To restore the initial "unsorted" state for the table,
click and select Reset View.

To reorder columns, use drag-and-drop for the corresponding cells in the header row.
To restore the initial order of columns,
click and select Reset View.

To hide a column, right-click the corresponding header cell and select Hide column.

To show a hidden column:

Do one of the following:

Right-click any of the cells in the header row and select Column List.

Press Ctrl+F12.

In the list that appears, the names of hidden columns are shown struck through.

Parameters pane

Shown in the two-column table are all the parameters detected in the input pane along with their values.

The parameters are grouped by SQL statements.
A group of parameters pertaining to the same statement has its own header row
(Parameter - Value).

To start editing a value, double-click the corresponding table cell,
or click the cell and press F2.
To indicate that you have finished editing a value, press Enter or click a different cell.
To quit the editing mode and restore an initial value, press Escape.

When you click a header row in the table, the corresponding statement is highlighted in the input pane.
Similarly, when you select a row containing a parameter, the corresponding parameter is highlighted.

When you place the cursor within a parameter in the input pane,
the corresponding row is highlighted in the table.