Exporting a Table
Only in DbVisualizer Pro
This feature is only available in the DbVisualizer Pro edition.
Using the Export Table dialog, you export the data of a table to a file, an SQL Commander tab or the clipboard. For SQL and XML, you can also export the DDL of the table.
- In the Databases tab, right-click the table and select Export Table.
- Choose the Output Format, the Output Destination and the Options, as described below. The options depend on the format and the database.
- Click Export.

To export several tables, or a subset of the rows, see Other ways to export.
Choosing the format
You can export to CSV, HTML, SQL, TXT, XML, Excel or JSON. SQL and XML can also contain the DDL; the other formats only contain the data. For more about SQL, see Exporting to SQL.
Choosing the destination
Export to one of these:
- A file.
- An open or a new SQL Commander tab. For an open tab, choose where to insert the text.
- The clipboard.
For Excel, you can only export to a file.
Options
The Options area has options for all formats at the top, and options for the selected format below them. For example, for SQL and for Excel:


For Excel, you can export to XLSX, the default, or to the older XLS format. For XML, you can choose the DbVisualizer format, the default, or one of the DbUnit formats, XmlDataSet and FlatXmlDataSet.
Other formats have options such as delimiters, a title and a description. The dialog uses the @export command, so all options are described in Exporting Results (@export).
The data formats, such as the formats of dates and numbers, are by default the ones set in Tools → Tool Properties. To use other formats for the export, for example because you will import the data into another type of database, click Data Format Settings. In the Data Format Settings dialog, you can also choose how to quote text values and handle quotes in them.
Databases write date, time and timestamp literals differently. If you export to SQL from one type of database and run the script in another type of database using DbVisualizer or another JDBC client, choose the JDBC escape format for these values. The driver then turns the values into the format of the target database.
Using variables in fields
In the file name and in the text fields, such as the title and description, you can use these predefined variables: ${dbvis-date}$, ${dbvis-time}$, ${dbvis-timestamp}$, ${dbvis-connection}$, ${dbvis-database-type}$ and ${dbvis-object}$.
Exporting to Excel
Excel doesn't keep the formats of dates, times and timestamps. To get the right format, select Export Date/Time as Text, or set the format in Excel.
The Excel formats have these limits:
- A text value can have at most 32,767 characters. If a value is longer, the export stops with an error. To export longer values, shorten them in a query, for example using
SUBSTR, or export to CSV instead. - XLSX allows at most 1,048,576 rows in a sheet.
- XLS allows at most 65,535 rows and 256 columns in a sheet.
Exporting BLOB and CLOB values to files
You can export each BLOB and CLOB value to a file of its own. The main export file then has a variable that refers to the file, instead of the value.
To do this, choose File as the data format for Binary/BLOB or CLOB, and optionally enter a folder or a file name pattern. Without a pattern, the files are saved in the temporary folder of the operating system, such as /tmp.

A pattern is a path with variables in it, for example /tmp/exp/${dbvis-date}$/${COUNTRY_NAME}$.txt. You can use the predefined variables, and a variable for each column of the table, such as ${COUNTRY_NAME}$. If the table has several BLOB or CLOB columns, use ${dbvis-column-name}$ to export each column to its own file. To insert a variable at the caret, click the arrow next to the field and select it.
For example, the BOOK table has the column ISBN, and pictures in the columns FRONT and BACK:
ISBN FRONT BACK
---------- ------------------- -------------------
0345391802 BINARY, 4,998 Bytes BINARY, 4,998 Bytes
0345391810 BINARY, 4,998 Bytes BINARY, 4,998 Bytes
With the pattern /tmp/${ISBN}$-${dbvis-column-name}$.png, you get these files:
/tmp/0345391802-FRONT.png
/tmp/0345391802-BACK.png
/tmp/0345391810-FRONT.png
/tmp/0345391810-BACK.png
Saving the settings
If you often use the same settings, save them, using the Settings menu button:
- Save As Default Settings: Use the current settings as the defaults the next time you open the dialog.
- Use Default Settings: Go back to the saved default settings.
- Remove Default Settings: Remove the saved defaults, and go back to the original defaults.
- Save As and Load: Save the settings to a file, and load them from a file.
- Copy Settings to Clipboard: Copy the settings, for example to use them in a script.
You can paste copied settings into SQL Commander to use them with the @export command.
Other ways to export
- To export several tables, or all tables in a schema, use Export Schema.
- To export some of the rows, or the result of a query, use the @export command, or export the grid with the result.