DBeaver Documentation

DOWNLOAD pdf

Data Viewing and Editing

Overview

DBeaver provides tools for data editing and viewing within its Data Editor. It supports inline editing in the grid view for quick data changes and a cell editor for more intricate entries, including a multi-line text. Users can manage rows by adding, copying, or deleting them and can utilize copy-paste functions for data transfer. Detailed information on these features and the steps for saving and reviewing changes are provided in the following sections.

Inline editing

Inline editing refers to the process of modifying content directly within a cell in a table. To initiate inline editing, users have several options:

  • Double-click the desired cell.
  • Click the cell to focus on it, then press Enter.
  • Right-click the cell and select Inline edit from the context menu.

Once in inline editing mode, the cell becomes editable, allowing the user to modify its value.

Tip: If your table doesn't have unique keys, DBeaver lets you create virtual keys to edit data.

Cell Editor

The Cell Editor in DBeaver is a tool designed for detailed data editing within individual cells. To access the Cell Editor, follow either of these methods:

  • Right-click on the desired cell and select Edit -> Edit cell from the context menu.
  • Click the cell to focus, then either press Shift+Enter or click the Edit cell button () located in the bottom toolbar.

Note: The toolbar is customizable. See Toolbar Customization article.

Data format handling

DBeaver manages a variety of data formats, and for most cells, activating the Cell Editor displays a property window:

This window is divided into two main sections:

  • Column Info: Provides detailed properties of the column.
  • Value: Enables users to modify the cell's value. After making changes, click Save to apply them. For extended editing, use the Open Editor option for a separate editor tab.

Specialized handling of CLOB and BLOB data types

In addition to general data formats, DBeaver offers specialized support for CLOB/BLOB data types:

  • Editing CLOB/BLOB data: Editing cells containing CLOB/BLOB data in the Cell Editor opens the content in a new tab, allowing for comprehensive editing, particularly useful for large data objects.
  • Saving/Loading BLOB values: Users can save and load BLOB values to and from external files, aiding in the management of binary data like images and large text files.
  • Image display in BLOB Columns: DBeaver automatically renders images stored in BLOB columns (formats like gif, png, jpeg, bmp) within the interface, streamlining the process of viewing image data.
  • Value View panel: To efficiently browse images in BLOB columns, users can activate the value view panel by pressing F7.

Setting cell value to NULL

To set a cell's value to NULL, right-click on the cell and choose Edit -> Edit cell -> Set to NULL.

Setting cell value to default

To set a cell's value to its default, right-click on the cell and select Edit -> Set to default from the context menu. The default value for the field, if predefined, will be displayed in parentheses next to this option.

Rows manipulation

Refer to the table below for instructions on adding, copying, and deleting rows in DBeaver's Data Editor.

Action Description Button/Image
Adding rows To add a new, empty row, click the Add row button in the bottom toolbar. This inserts a row below the focused row. Populate the new row via inline editing or separate cell editor. Add Row Button
Copying rows To duplicate rows, select the rows and click the Duplicate row button. The duplicates will appear below the original rows. Duplicate Row Button
Deleting rows For deleting rows, select them and click the Delete current row button. Rows marked for deletion turn red and are removed upon saving. Delete Row Button

Copying and pasting cells

This section outlines the procedures for copying and pasting cell data within DBeaver.

Basic copy

To copy the contents of one or more cells to the clipboard in a TAB-delimited format, you can use the shortcut Ctrl+C. Alternatively, right-click on the cell or selection of cells and select Copy from the context menu. This copied content can then be pasted into spreadsheet editors like Excel.

Advanced copy

For more control over the copy process, DBeaver offers an advanced copy option. This feature allows users to include column names and row numbers, configure delimiters, and choose value formats during the copy operation. Activate this feature by pressing Ctrl+Shift+C or by selecting Advanced Copy -> Advanced Copy from the context menu after right-clicking on the selected cells. The Advanced Copy settings window provides various options:

Field Description
Copy header Includes the column names as headers in the copied data.
Copy row numbers Adds the row number for each row in the copied data.
Quote cell values Encloses each cell value in quotes.
Always quote values Forces quoting of all cell values, regardless of the need.
Copy as HTML Formats the copied data as HTML, suitable for web publishing.
Value display format Determines how the copied data will be displayed.
Column Delimiter Character or sequence used to separate columns in the copied data.
Row Delimiter Character or sequence used to separate rows in the copied data.
Quote Character Character used to quote cell values if quoting is enabled.

In addition to these options, users can perform a Save as operation in various formats by selecting Advanced Copy from the context menu after right-clicking on the selected cells, which can be further configured for each format. Here are the additional options available:

Option Description
Copy as CSV Copies the data in Comma-Separated Values format.
Copy as DbUnit Copies the data in the DbUnit dataset format.
Copy as HTML Copies the data in Hypertext Markup Language format for web use.
Copy as JSON Copies the data in JavaScript Object Notation format.
Copy as Markdown Copies the data in Markdown format suitable for documentation.
Copy as SQL Copies the data as SQL INSERT or UPDATE commands.
Copy as Source code Copies the data in a format ready to use in source code.
Copy as TXT Copies the data as plain text.
Copy as XML Copies the data in eXtensible Markup Language format.

To further refine how each format is copied, select Configure 'Copy as' commands... from the context menu. This opens a configuration window where you can set the specific copying behavior for each format, such as delimiter choice, quoting options, and more, ensuring the copied data meets the requirements of different use cases and target applications.

Basic paste

To paste copied content, press Ctrl+V when focusing on a cell. DBeaver intelligently handles the pasting process, applying necessary data type conversions to fit the destination cell's format.

Advanced paste

DBeaver's Advanced Paste feature caters to scenarios requiring the insertion of multiple cells or complex data structures. It can be accessed through the context menu or by using the shortcut Ctrl+Shift+V. When activated, the following options are presented in a dialog:

Feature Description
Insert multiple rows Allows for the pasting of data into multiple rows at once.
Ignore quotes Disregards quotation marks when parsing pasted values.
Insert NULLs Allows for pasting the NULL values.
NULL value mark Defines the symbol or text that represents a NULL value.

These settings provide additional control over how data is pasted, ensuring that data is inserted correctly and efficiently, especially in bulk operations or when special data considerations are necessary.

Saving and previewing changes

In DBeaver, data modifications are committed to the database when saved. To confirm changes:

  • Click the Save button in the bottom toolbar.
  • To revert modifications, click the Cancel button .

Tip: The Save and Cancel buttons are enabled only after making edits and moving to another cell.

To validate changes before saving, preview the SQL script:

  • Click the dropdown arrow next to the Save button .
  • Choose Generate Script. The Preview Changes window will display the SQL script for review and copying if required.