The options dialog enables you to influence the behaviour and look of SQL Workbench/J to meet your needs. To open the options dialog choose
→ .With this option you can enable an automatic update check when SQL Workbench/J is started. You can define the interval in days after which the application should check for updates on the homepage. If a newer version is found on the website this will be indicated with a little globe in the statusbar. Clicking on the icon will open your default internet browser with the application's homepage.
If you disable this option, you can manually check for updates using the menu
→ .With this option you can select in which language the application is shown. The new value will only be in affect when you restart the application.
If this option is enabled, the password stored within a connection profile will be encrypted. Whether the password should be stored at all can be selected in the profile itself.
![]() | |
Using this option only supplies very limited security. As the source code for SQL Workbench/J is freely available, the algorithm to decrypt the passwords stored in this way can easily be extracted to retrieve the plain text passwords. |
Usually SQL Workbench/J reports the success and timings for each statement that is beeing executed in the message tab of the current SQL panel. For large scripts this can slow down script execution dramatically. If this option is enabled, only a summary of the execution is printed once the script has finished. You can turn off the log during script execution by using the WBFEEDBACK command.
Enable or disable the use of an animated icons in the SQL editor to indicate a running SQL statement. It has been reported, that the animated icon does have a severe (negativ) impact on the performance on some computers (depending on JDK/OS/Graphics driver). If you experience a high CPU usage during the execution of SQL statements, or if you find your SQL statements are running very slow, try to turn off the usage of the animated icons.
The default delimiter used when exporting data to a text file. This can be overridden in the file selection dialog when actually exporting the data.
The default character to be used to quote column data when exporting to
a text file. This value will be used when you don't specify a quote
character e.g. for the WbExport
command and when you use →
to export a result set.
If you want to display the PDF manual from inside the application, you need to
specify the full path to your PDF reader application. If this is defined
and the file SQLWorkbench-Manual.pdf
is available in the
directory where sqlworkbench.jar
is located, you will be
able to display the PDF manual by selecting
→ .
If this option is enabled, then the cursor will automatically jump to the next statement in the script, when you execute a single statement using Ctrl-Enter ("Run current statement"). This can also be toggled through the menu →
For more information on how you can execute statements in the editor, please refer to Executing Statements
Normally a right click in the SQL editor does not change the location of the cursor (caret). If this option is checked, then a right click will also change the caret's location (to where the mouse cursor is located)
When using the quicksearch feature in the code completion this option controls the behaviour when hitting the ESC key. If this option is enabled, the ESC key will also close the popup window with the available choices. If this option is disabled, the ESC key will only close the quicksearch input field.
With this option you can select how the selected object name
from the code completion popup is pasted into the editor. As is
means, that the values will be inserted into the editor as it was
retrieved from the database. This option will also be used when SQL statements
are generated internally (e.g. for updating the result set or when you
export/copy data as SQL statements)
When selecting to paste all (or several columns) from the popup window, you can select with this option, in which order the columns should be written into the editor.
This property controls the line terminator used by the editor when sending SQL statements to the database. The value "Platform default" relates to the platform where you run SQL Workbench/J this is not the platform of the DBMS server.
The editor always uses "unix" line ending internally. If you select a different value for this property, SQL Workbench/J will convert the SQL statements to use the desired line ending before sending them to the DBMS. As this can slow down the execution of statements, it is highly recommended to leave the default setting of Unix line endings. You should only change this, if your DBMS does not understand the single linefeed character (ASCII value 10) properly.
This property controls the line terminator used when a file is saved by the editor. Changing this property affects the next save operation.
The font that is used in the SQL editor. This font is also used when displaying the SQL source for tables and other database objects in the DbExplorer.
When a statement is not executed correctly (and the DBMS signals an error) it is highlighted in the editor. With this option you can select the color that is used to highlight the incorrect statement.
This options defines the default alternate delimiter. You can override this default in the connection profile, to use different delimiters for different DBMS. For details see using the alternate delimiter
The number of statements per tab which should be stored in the statement history. Remember that always the full text of the editor (together with the selection and cursor information) is stored in the history. If you have large amounts of text in the editor and set this number quite high, be aware of the memory consumption this might create.
If this option is enabled, the content of external files is also stored in the statement history.
Electric scrolling is the automatic scrolling of the editor when clicking into lines close to the upper or lower end of the editor window. If you click inside the defined number of lines at the upper or lower end, then the editor will scroll this line into the center of the visible area. The default is set to 3, which means that if you click into (visible) line 1,2 or 3 of the editor, this line will be centered in the display.
The editor recognizes character sequences that consist of letters and characters only as "words". This influences the way word by word jumping is done, or when selecting text using a doubleclick. Every character that is entered for this option is considered a "word" character and thus does not mark a word boundary.
By putting e.g. an underscore into this field, the text MY_TABLE
is
recognized as a single word instead of two words (which is the default).
The font that is used to display result sets. This includes the object list and results in the DbExplorer.
Define the format for displaying date, date/time (timestamp) and time columns in the result
set. For details on the format of this option, please refer to the
documentation of the SimpleDateFormat
class.
This format is also used when parsing input for date or timestamp fields, so if you
enter a date while editing the data,
make sure you enter it the same way as defined with this option.
Here is an overview of the letters and their meaning that can be used to format the date and timestamp values. Be aware that case matters!
Letter | Description |
---|---|
G | Era designator (Text, e.g. AD) |
y | Year (Number) |
M | Month in year (Number) |
w | Week in year (Number) |
W | Week in month (Number) |
D | Day in year (Number) |
d | Day in month (Number) |
F | Day of week in month (Number) |
E | Day in week (Text) |
a | AM/PM marker |
H | Hour in day (0-23) |
k | Hour in day (1-24) |
K | Hour in am/pm (0-11) |
h | Hour in am/pm (1-12) |
m | Minute in hour |
s | Second in minute |
S | Milliseconds |
z | General time zone (e.g. Pacific Standard Time; PST; GMT-08:00) |
Z | RFC 822 time zone (e.g. -0800) |
The character which is used as the decimal separator when displaying numbers.
Define the maximum number of digits which will be displayed for numeric columns. This only affects the display of the number internally they are still stored as the DBMS returned them. To see the internal value, leave the mouse cursor over the cell. The tooltip which is displayed will contain the number as it was returned by the JDBC driver. When exporting data or copying it to the clipboard, the real value will be used.
If this option is selected, the rows in the data table will be displayed with alternating background color. You can choose the alternate color (the other color is defined by the used Look & Feel) with the font chooser next to the checkbox.
If this option is enabled, you will be able to resize individual rows in the result set.
If this option is enabled, the widths of the result set columns are automatically adjusted to fit the largest value (respecting the min. and max. size settings)
When calculating the optimal width for a column (either manually or if "Auto adjust column widths" is enabled, then the column's label will be included in the width calculation if this option is enabled. If this option is disabled, and the column contains very short values, the column width could be smaller than the column's label.
When the initial display size of a column is calculated, or if you optimize the column widths to fit the actual data, columns will not exceed this width. This is useful when displaying large character columns.
When this option is enabled, the statements which are sent to the database when saving changes to result set table, are displayed before execution. The update can be cancelled at that point if the statements are not correct. The generated statements can also be saved to a file from that window.
![]() | |
The statement(s) that are displayed in the confirmation window can not be changed! |
When editing data either in the result set or in the
data tab of the DbExplorer, fields that are set to NOT NULL
in the underlying table, will be displayed with a different background color
if this option is selected.
If required fields are highlighted during editing, this option defines the background color that is used.
This property defines a mapping file for primary key columns. The information
from that file is read whenever the primary keys for a table of
cannot be obtained from the database. For a detailed
description on how to define extra primary key columns, please
refer to the WbDefinePk
command.
The Database Explorer can either be displayed as a separate window or inside the main window as a another tab. If this option is selected, the Db Explorer will be displayed inside the main window. If the option Retrieve DB Explorer is checked as well, the current database scheme will be retrieved upon starting SQL Workbench/J
By default triggers are shown only in the details of a table. If the option "Show trigger panel" is selected, an additional panel will be displayed in the DbExplorer that displays all triggers in the database independently of their table.
If this option is enabled, the contents of the database schema is retrieved when the DB Explorer is displayed. If this option is not checked, either the
button or selecting a schema or table type will load the list.The list of objects can be filtered with the dropdown. If the option "Remember object type" is selected, the current object type will be stored in the workspace of the current connection, and will be restored the next time.
When this option is selected, the sort column in the data display of the DbExplorer will be restored after reloading the table data.
When this option is selected, the focus inside the DbExplorer will be set to the data panel, after an object in the list has been selected (and the data panel is visible).
When this option is selected, a rectangle indicating the currently
focused panel will be displayed, to indicate the component that
will received keystrokes e.g. shortcuts such as Ctrl-R
.
When displaying the SQL source for a table, a name will be generated for primary key constraint if the current constraint has no name or a system generated name.
![]() | |
If this option is selected, the generated SQL does not reflect the real statement that was used to create the table! |
The title bar of the main window displays displays information about the current connection, workspace and editor file. Some of these elements can be enabled or disabled with the options on this page.
If this option is enabled, the Application name will be put at the end of the window title.
If this option is enabled, the currently loaded workspace name will be displayed in the main window's title.
If this option is enabled, the group of the current connection profile will be displayed in the main window's title. The name of the current connection profile will always be shown.
If you select to display the current profile's group, you can select a pair of characters to put around the group name.
If you select to display the current profile's name and group, you can select the character that separates the two names.
If the current editor tab contains an external file, you can choose if and which information about the file should be displayed in the window title. You can display nothing, only the filename or the full path information about the current file. The information will be displayed behind the current profile and workspace name.
These options influence the behaviour of the SQL Formatter when reformatting a SQL statement in the editor.
When the SQL formatter hits a sub-SELECT while parsing it will not reformat any statement which is shorter then the length specified with this option, i.e. any sub-SELECT shorter then this value will be formatted as one single statement without line breaks or indention. See SQL Formatter for details on how the SQL formatting works.
This property defines the number of columns the formatter puts in on line
when formatting a SELECT
statement.
When using the editor to transform
lines into lists suitable for an IN
list, this option
defines how many values will be put into a single line when creating
quoted elements ("Create SQL List").
If formatting of UPDATE
statements is enabled,
the threshold defines how many columns have to be present for a single
UPDATE
statement in order to put each column
into a separate line. If the number of columns is lower then this value
they will remain on one line. The keywords (UPDATE, WHERE) will
still be formatted into new lines.
If formatting of INSERT
is enabled, the way they
are formatted can be controlled with several values.
If the number of columns in the statement exceeds this value, the columns will be spread over several lines. The number of columns that are put into each line is controlled using the option "Columns per line".
This setting controls whether SQL Workbench/J uses the onwer (schema) when creating SQL scripts during exporting data (through WbExport or "Save as"). When this option is selected, the usage of the schema depends on the ignore schema setting that controls ignoring certain schemas for specific DBMS. When this is option is not selected, the schema/owner will never be used for SQL scripts.
Defines the date literal format to be used when copying data
as SQL statements to the clipboard. For a detailed description
of the different formats please refer to the
WbExport description.
This option does not influence the default format used by the WbExport
command.
![]() | |
When you copy data as "Text" (tab-separated) to the clipboard, the date and timestamp format from the general options is used. |
Defines the date literal format to be used for the WbExport
command. The value of this option is used if the -sqlDateLiterals
switch is not supplied when running WbExport
.
This default value is reported when WbExport
is executed
without parameters.
On this page, you can define external tools (programs). Currently the only place where this is used, is in the blob info dialog, to open the BLOB data with one of the defined external tools. This could be a program to display images (like XnView), Acrobat Reader to display PDF documents, OpenOffice to display office documents or a text editor (like PSPad) to display text files.
If you want to use additional Look and Feels that are not part of the JDK, you can specify them here.
A Look And Feel definition consists of a name, the class name to be used and the location of the JAR file that provides the look and feel implementation. The class name that has to be used should be available in the documentation of the look and feel of your choice. The name is SQL Workbench/J internal and is only used when displaying the list of available Look and Feels.
When you switch the current Look & Feel, you will need to restart the application to activate the new look and feel. Note that if you switch the current Look & Feel it will be changed, regardless whether you close the options dialog using Cancel or OK.
![]() | |
The current look and feel is only changed when you click on the not change the look and feel. button. Simply selecting a different entry in the list on the left side will |