# Change rows

> Set or add to columns of every matching row.

Source: https://docs.buildcord.dev/nodes/variables-and-data/change-rows/

`data.update` changes every row that matches a condition.

## Settings

| Setting | What it does |
| --- | --- |
| Collection | The collection to change. |
| Where | Which rows to change. Empty matches every row. |
| Set | Columns to set, one per line, such as `status: closed`. |
| Add to | Columns to add to, one per line, such as `balance: -{temp.cost}`. Each line adds an equation's answer to a number column. |

## Ways out

`out`. Turn on **If it fails** for a red way out.

## Produces

`{updated.count}`, how many rows changed.

## Notes

> **Warning: Add to is safe, set isn't**
>
> Two runs adding at once both count. Setting a value you read earlier doesn't guarantee that, because another run may have changed it in between. For balances and counters, use **Add to**, or put [One run at a time](https://docs.buildcord.dev/nodes/variables-and-data/one-run-at-a-time) before the read.

## Related

- [Find rows](https://docs.buildcord.dev/nodes/variables-and-data/find-rows)
- [Delete rows](https://docs.buildcord.dev/nodes/variables-and-data/delete-rows)
