---
title: Change, add and delete rows
project: TotalSQL
version: Latest
section: guides
language: en
license: 
url: https://totaljs.es/docs/totalsql/latest/guides/edit-rows/
updated: 2026-12-02T15:40:26.075Z
---

# Change, add and delete rows

> Your changes wait in the grid until you read their SQL and save them together. Nothing reaches the database before that.

## Change a value

1. Double-click it, or go to it and press Enter or F2.
2. Write the new value, and press **Change**. The cell is marked.

You can also change the values of the selected row in [the row on the side](/totalsql/latest/guides/rows/#see-a-whole-row).

Each type has its own field:

| Type | How it is changed |
| --- | --- |
| Yes or no | **True**, **False** or **NULL** |
| Dates and times | A calendar and a clock, and **Now**. The time zone of the value stays |
| JSON | A text that is checked as you write, and **Lay out** to arrange it |
| UUID | A text, and **New** to make one |
| Binary | Hexadecimal, as `0x0a1b` |
| Lists of PostgreSQL | As the database writes them: `{a,b,c}` |

**Set NULL** takes the value away, where the column allows it. An empty text is not the same as NULL.

## Add a row

Press **Row**, fill in the fields and press **Add**. An empty field takes the default of its column, and **needed** marks those that have none. The new row does not show in the grid until you save: the line at the bottom counts it.

## Delete a row

Select the row and press the bin, or choose **Delete this row** with the right button. The row is crossed out. **Keep this row** takes it back.

## Save

1. Press **Save**, which says how many changes wait.
2. Read the statements.
3. Press **Save**.

They run together: if one fails, none is kept. Each change must touch exactly one row. If someone deleted the row or changed its key in the meantime, nothing is saved, and TotalSQL shows the statement. If someone changed another value of the row, yours takes its place.

**Discard** forgets all the changes that wait.

Sorting, filtering, changing the page and reloading read the rows again, so TotalSQL asks before it loses the changes that wait. It also asks when you close the tab, the connection or the window, and when you quit from the menu.

## When rows cannot be changed

The line at the bottom says why:

- **Rows have no primary key, so they are not edited here**: TotalSQL needs a primary key, or a unique index on columns that are never NULL, to know which row to change. Use [a query](/totalsql/latest/guides/queries/).
- **This connection is read-only**: change its [care level](/totalsql/latest/guides/care/).
- **A view is read, not edited, here**.

Columns filled by the database, such as a counter or a computed value, cannot be changed.
