Edit data
Insert, update, and delete rows in Table Mode with a diff preview before anything hits the database.
For: everyone. The safety net is the diff preview — review before commit, every time.
QueryDeck lets you edit rows directly in the data grid. Changes are staged locally first, shown in a diff, and only sent to the database when you commit.
Enable editing
Editing is on by default in Table Mode unless the connection is read-only (see SQLite read-only) or your database user doesn't have INSERT/UPDATE/DELETE privileges.
Edit a cell
Double-click any cell. The cell becomes an input field with the current value selected. Type the new value, press Enter to commit the edit locally, Esc to cancel.
Edited cells get a colored corner marker so you can see at a glance which rows have unsaved changes.
Edit special types
| Type | How to edit |
|---|---|
| Text | Free typing |
| Number | Free typing, validated as numeric |
| Boolean | Click the checkbox |
| Date/timestamp | Date picker opens automatically |
| JSON | Inline editor with syntax highlighting |
| Enum | Dropdown with the allowed values |
| UUID | Free typing, generate a new UUID from the right-click menu |
| Array | Comma-separated list in the editor |
To set a cell to NULL, click into it and press Cmd+Delete, or right-click → Set NULL. To restore the default value, right-click → Set Default.
Insert a new row
Two ways:
- Press
Cmd+Nwhile in Table Mode. - Scroll to the bottom of the grid and click the "+" row.
A blank row appears at the bottom with placeholder values. Defaults are pre-filled from the schema (now(), gen_random_uuid(), fixed values). Primary keys with auto-increment or default uuid_generate_v4() are left blank — the database fills them on insert.
Delete rows
Select one or more rows (click, Shift+click for a range, Cmd+click to add individual rows), then Delete or right-click → Delete Row(s).
Deletions are also staged locally. They show as struck-through rows until you commit.
Preview the diff before commit
After any edit, the top of the grid shows a "Pending changes" bar with the count: 3 inserts, 2 updates, 1 delete.
Click Preview to see the diff:
- Inserts show the new row in green.
- Updates show old → new values, with the changed fields highlighted.
- Deletes show the row in red.
QueryDeck shows you the exact SQL it will run. You can copy it, scrutinize it, and only then proceed.
Commit
Click Commit Changes in the pending bar. QueryDeck wraps everything in a transaction, sends it to the database, and either:
- All changes succeed → the pending bar disappears, the grid refreshes.
- Any change fails → the transaction is rolled back, an error sheet explains which statement failed and why. Nothing on the server changed.
This is atomic. There is no half-applied state.
Rollback
To throw away staged changes without sending them, click Discard in the pending bar. The grid reverts to the database state.
You can also rollback individual changes: right-click any edited cell or row → Revert. Bulk revert: select rows → right-click → Revert Selected.
Editing rules
To prevent surprises, QueryDeck refuses to commit in some cases:
| Refusal | Why |
|---|---|
| Update a row with no primary key | QueryDeck can't write a safe UPDATE without WHERE pk = ?. Use a query in the editor. |
| Delete more than N rows at once (configurable, default 100) | Sanity check. Override by typing a query. |
| Edit a view | Views are read-only in most databases. Update the underlying table. |
| Cell larger than 1 MB | The grid is for normal editing. Large blobs are better managed via queries. |
On production connections
When you commit on a connection with red color (production), QueryDeck shows a confirmation sheet listing the changes and asking you to type the connection name to confirm. This is on by default and can be turned off in Settings → Editor (not recommended).
What's next
- Export your edits as SQL — useful for code review or running on staging first
- Run a custom UPDATE when the grid isn't the right shape for the change