Skip to content

DataChange rows

Edit data in the grid

How to Edit Table Data without writing SQL.

Data editor showing a table with inline editing in VS Code

To select a table, begin by opening a connection from the DB Explorer pane.

Selecting a database connection

After selecting Connection, select a Database.

Selecting a database

Now expand Tables by double clicking and click on specific table. This will open that specific table in a new tab.

Selecting a table

To edit the data, double click on a cell to open the editor and enter the value you want to set.

To enter null in a field, simply enter (null) in the cell.

A context menu is also available to set common values depending on the data type of the cell, for example to update a value to NULL right click and select Set Value > null if the column is nullable.

Selecting a cell to edit

The grid shows dates and times in your computer’s time zone. When you type a date and time without a time zone, for example 2024-07-15 10:00:00, DBCode reads it in that same zone, so the value saved is the one you see. Filters and the Query Builder work the same way.

To work in UTC instead, turn off dbcode.format.dateLocalTimezone. The grid then shows UTC, and typed times are read as UTC.

With Date Style (dbcode.format.dateStyle) set to Raw, the grid shows each value exactly as the database returns it, and typed times are read in that same zone.

To check the SQL before it runs, open the menu on the Save button and select Script Changes.

In SQL you write yourself, the database decides the zone of a time typed without one. On PostgreSQL, Oracle, Snowflake, Databricks, Exasol, Vertica, Firebird and Dameng, DBCode sets the connection to the zone the grid shows, so your SQL matches the grid. When you change that zone, DBCode offers to reconnect. If a PostgreSQL or Snowflake server doesn’t know your computer’s zone, the connection keeps the server’s zone, and on PostgreSQL DBCode tells you. MySQL, SQL Server and BigQuery use the database server’s zone. To be exact on any database, include the offset, for example 2024-07-15 10:00:00-04:00.

After making changes, click the Save button (Ctrl/Cmd+S) in the toolbar. Modified cells are highlighted until saved.

Save button in the toolbar

If a primary key is not present on the table, a prompt appears to select Column with Unique Value to ensure changes are matched to unique rows in your data.

Save changes dialog

DBCode automatically validates update or delete operations before executing them on the database. This step is crucial to ensure that changes affect only the intended data.

During the validation process, each row with an update or deletion is checked to confirm that only one unique row in the table is affected. If validation fails, the changes are not applied, and an error notification is provided.