Skip to content

Editing Table Data

Only in DbVisualizer Pro

This feature is only available in the DbVisualizer Pro edition.

With the DbVisualizer Pro edition, you can edit table data directly within the Data tab grid; simply click a cell value to begin editing. Edits are saved in a single database transaction, which ensures that either all changes or none are committed. The editing feature supports saving binary and large text data, and it automatically renders common data formats in their respective viewers, such as the image viewer, PDF, XML, HEX, and more.

Opening the Data tab

To open the Data tab for a table:

  1. Locate the table in the Databases tab tree.
  2. Double-click the table node to open its Object View tab.
  3. Open the Data sub-tab.

Example of Data tab

Each column width is automatically resized to match the column width, including the column header, by default. You can disable this behavior in the the Tool Properties dialog, in the Grid category under the General tab.

If Auto Resize Column Widths is enabled, the Max Column Width setting can be used to limit the column width so that an extremely wide column does not take up all space.

Editing data in the grid

To edit a column value:

  1. Select the column cell.
  2. Type the new value, or double-click the cell to modify the current value.
  3. Click the Save toolbar button to update the database.

You can also use the Set Selected Cells drop-down menu to quickly set multiple column values to common values like NULL or the current date and time.

To add a new row:

  1. Select the row directly above where you want to insert the new row.
  2. Click the Add Row toolbar button.
  3. Enter values for the respective columns.
  4. Click the Save toolbar button to update the database.

To duplicate a row:

  1. Select the row you want to duplicate.
  2. Click the Duplicate Row toolbar button.
  3. Edit at least the key column values to maintain uniqueness.
  4. Click the Save toolbar button to update the database.

To delete one or more rows:

  1. Select the rows you want to remove.
  2. Click the Delete Rows toolbar button.
  3. Click the Save toolbar button to finalize the removal in the database.

If you change your mind, you can easily undo your pending edits:

  1. Select the cell(s) you want to revert.
  2. Click the Undo toolbar button.

Reverting all cells in a row marked as Insert or Duplicate removes the uncommitted row from the grid entirely, while undoing a row marked as Delete clears its deletion state. Undoing updated cells simply reverts the changes back to their original values.

Copy and paste

You can copy selected cell values with the Copy Selection right-click menu choice or the corresponding keyboard shortcut (Ctrl+C or Command+C by default). The data in the clipboard can then be pasted either elsewhere into DbVisualizer or into an external application.

The column and newline delimiters used for copy and paste operations in the grid editor are defined by the Copy Grid Cells in CSV Format settings in Tools → Tool Properties under the General / Grid category. The default settings are sufficient for most use cases.

The grid editor supports pasting data directly from major spreadsheet applications, such as Google Sheets, Microsoft Excel and OpenOffice Calc. The editor handles pasting both single data cells and larger data blocks. Copying and pasting binary data is transparent between separate grids or within the same grid. You can also copy binary files within your operating system's file browser and paste them directly into a cell in DbVisualizer (provided the target cell supports a binary type).

Copy from spreadsheetPaste into DbVisualizer grid
A block of cells is copied Block of cells is copiedThe block is pasted into the selected region Pasting block into the selected region
A block of cells is copied Block of cells is copiedThe block cannot be pasted into a different number of target cells Error when trying to paste block into a different number of target cells
A single cell is copied Single cell is copiedPaste into selected target cell Pasting into selected target cell
A single cell is copied Single cell is copiedPaste and fill the single column target selection Pasting into single column target selection
Multiple cells in a single row are copied Cells in a single row are copiedPaste and fill the target selection Pasting and filling the target selection

Updates and deletes must match only one table row

When you update or delete rows, DbVisualizer ensures that only one row in the table is affected. This safety check prevents changes in one row from silently altering data across other rows. DbVisualizer uses the following strategy hierarchy to determine the uniqueness of an edited row:

  1. Primary Key
  2. Unique Index
  3. Manually Selected Columns

The Primary Key concept is widely used in databases to uniquely identify key columns in tables. If the table has a primary key defined, DbVisualizer uses it automatically. If no primary key is defined, DbVisualizer checks for a unique index. If multiple unique indexes exist, DbVisualizer selects one of them. If there is no primary key or unique index defined for the table, you must manually choose which columns to use as the unique constraint. The Key column chooser is displayed automatically if the key columns cannot be determined by the application.

Key column chooser

Normally, database tables have a primary key or at least one unique index, making editing straightforward. However, if there is no native way to uniquely identify rows in a table, you must manually define which columns DbVisualizer should track.

While saving modifications, DbVisualizer checks that there is an active method to identify unique rows. If this cannot be accomplished, the following dialog is displayed:

Key column chooser interface

The key column chooser can also be opened manually at any time. Right-click inside the data grid to open the context menu and select Edit Table Data → Key Column Chooser.

If the database request to save your edits cannot uniquely identify the single row that should be modified, an error dialog is displayed and the uncommitted editing state is maintained for that row in the grid editor.

Editing multiple rows

The grid editor supports modifying multiple rows and saving all changes together in a single database transaction. Edited rows are flagged with status icons in the row header:

Cell(s) in the row have been edited
Row is new
Row is duplicated from another row
Row is marked for deletion (further edits are not allowed)

Data type checking

When navigating away from an edited cell, the new value is instantly validated against the explicit data type of that column. If a validation error occurs, the following dialog appears:

Dialog for data type error

Newline and carriage return

If a cell in the grid or record editor contains newline, carriage return, or tab control characters, they are visually represented in the grid interface. However, an informational warning dialog appears whenever you attempt to edit such a value directly to prevent accidental text malformation:

Warning when trying to edit control characters

Grid viewers

Data within grids can be displayed using three distinct, dedicated viewers:

  • Value viewer: Displays the contents of a single selected grid cell. Depending on the detected data type, it automatically displays a text, image, XML, JSON, serialized Java object, or HEX viewer.
  • Record viewer: Displays all column values for the currently selected row in a transposed, form-based layout where columns are presented vertically as rows.
  • Aggregates viewer: Displays real-time summary statistics and calculated aggregation metrics (such as sum, count, and average) for your active grid selection.

By default, these viewers are presented as tabs positioned to the right of the data grid. If you want to maximize the space available to the grid, you can configure the viewers to launch in separate floating windows instead. To do so, open Tools → Tool Properties and check the General / Grid / Grid Viewers category.

Value viewer

The value viewer displays the selected grid cell value in a content type-specific format. The following viewers are available:

  • Text
  • XML
  • JSON
  • PDF
  • Image (GIF, JPEG, PNG, TIFF, BMP, SVG)
  • Serialized Java Object
  • HEX
  • Date, Time, and Timestamp (includes interactive choosers when editing)

You can open the Value viewer using any of the following methods:

  • Click the grid toolbar button:
  • Select Value Viewer from the grid's right-click context menu.
  • Double-click a CLOB or binary cell.
  • Double-click a text cell that contains newline or tab characters.
  • Double-click a cell that has been truncated due to the Max Chars setting (configured in Tools → Tool Properties under the General / Data Formats category).

The following example shows the Value viewer displayed to the right of the grid:

In this scenario, a binary cell is selected in the grid. The Value viewer automatically detects the content type and displays it in the matching format - in this case, a text editor.

Click the leftmost eye icon to display a list of all available viewers:

Only viewers supported by the selected cell's data type are enabled.

  • Show Metadata: Displays a pane at the bottom of the Value viewer containing detailed database type information for the cell.
  • Auto-detect Viewer: When enabled, automatically renders structural formats like XML and JSON in a dedicated graphical viewer rather than a plain text editor.

The Value viewer also supports drag-and-drop file imports, allowing you to drop files directly onto the panel to load their contents.

For additional settings related to this panel, navigate to Tools → Tool Properties and check the General / Grid / Grid Viewers category. In particular, you can opt to apply your standard text editor font to the Value viewer, which is helpful if you frequently work with text fields that contain embedded code.

Editing in the value viewer

When editing is supported by the underlying dataset, changes made in the data grid propagate immediately to the Value viewer, and vice versa.

Editing JSON values

By default, the Value tab presents JSON data in a structured tree format. To modify a JSON value, you can either edit the whole value directly within the main data grid cell or edit specific nodes by double-clicking the corresponding cell inside the tree view.

For advanced modifications, click the Text Editor button in the top-right corner of the JSON tree view. This switches the interface to a text editor where the JSON value can be edited directly as code. To customize the fonts and styles for this editor, navigate to Tools → Tool Properties and select the General / Appearance / Editor Styles section. Open the Token Styles tab and choose JSON from the Syntax drop-down menu.

Record viewer

The record viewer displays the selected grid row in a transposed ("rotated") view, presenting the original columns vertically as rows. This layout is highly convenient for navigating wide grids that contain a large number of columns.

You can open the record viewer using any of the following methods:

  • Click the grid toolbar button:
  • Select Record Viewer from the grid's right-click context menu.
  • Double-click the row number to the left of the corresponding grid row.

The following example shows the record viewer displayed to the right of the grid:

The Key column displays a key icon for primary key columns, while the Name field corresponds to the column's header in the grid. The Value field displays the data for each respective column.

For CLOB and binary data types, the Value field displays an icon indicating the asset's total data size. To view or modify this data, double-click the cell to open the value viewer in a separate window, or click the icon in the toolbar. You can adjust data formatting preferences by navigating to Tools → Tool Properties under the General / Data Formats category.

The navigation buttons in the toolbar allow you to step through the rows in the grid while automatically updating the active row inside the record viewer.

To view detailed database metadata for a specific column - such as the data type, nullability and so on - hover your cursor over the Name field.

For additional settings related to the record viewer, open Tools → Tool Properties and check the General / Grid / Grid Viewers category.

Editing in the record viewer

When editing is supported by the underlying data set, modifications made in the grid propagate immediately to the record viewer, and vice versa. Pending edits inside the record viewer are highlighted using the same status colors as in the main grid.

Previewing changes

You can preview the raw SQL statements that will be executed before finalizing your edits. To do so, open the right-click context menu in the grid and choose Edit Table Data → SQL Preview.

Example of SQL preview

The listed SQL statements may not be 100% identical to the exact statements sent to the database server, as the save engine utilizes variable binding to securely pass values to the database.

Viewing and editing binary/BLOB and CLOB data

Due to the structural nature of binary/BLOB and CLOB data, values of these types can only be fully modified and inspected inside the value viewer. (There is partial support in the record viewer to view image data and to load data from a local file).

In the standard grid view, binary/BLOB and CLOB data fields are represented by an icon accompanied by the total byte size of the value. You can select an alternative presentation format in Tools → Tool Properties under the General / Data Formats category. Note that selecting By Value or Image Preview causes minor performance penalties and increases memory consumption.

The Image Preview option for BLOB types renders a downscaled image thumbnail directly inside the grid if the underlying binary object matches a supported image format. You can customize this thumbnail preview size in your preferences.

In the same Tool Properties section, you can specify how the clipboard handles Copy/Paste and Drag and Drop operations when pasting binary payloads into target components that do not natively support binary objects.

Modifying binary data fields can be achieved either by importing data from an external file or by utilizing the text editor window inside the value viewer. You can also copy a file inside your operating system's native file browser and paste it directly into a target BLOB/CLOB cell.

Binary data within DbVisualizer serves as a generic term for several common binary database data types:

  • LONGVARBINARY
  • BINARY
  • VARBINARY
  • BLOB

Document data

DbVisualizer offers additional specialized grid features when working with document-oriented databases. Check the Working with Document Cata chapter for more information.