> ## Documentation Index
> Fetch the complete documentation index at: https://docs.auxilian.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# update_rows

> Set column values on every row that matches all filters.

Updates every row that matches the filters and returns how many changed. At least one filter is required, so a whole table can't be updated by accident.

| | |
| - | - |
| Scope | `mcp:write` |
| Annotations | `readOnlyHint: false` |
| Activity event | `update_rows` with `table` and `count` |

## Parameters

<ParamField body="projectId" type="string" required>
  Project id from `list_projects`. You need write access.
</ParamField>

<ParamField body="table" type="string" required>
  Table name.
</ParamField>

<ParamField body="filters" type="object[]" required>
  At least one condition. Rows must match all of them. See [Filters](/mcp/filters).
</ParamField>

<ParamField body="patch" type="object" required>
  Column values to set, keyed by column name. Pass `null` to clear a value. `id` and `created_at` can't be updated.
</ParamField>

## Result

<ResponseField name="updated" type="integer">
  The number of rows updated. `0` when nothing matched.
</ResponseField>

## Example

```json Arguments theme={null}
{
  "projectId": "01k7m3x9q2v8d4h6n1r5t0w2yz",
  "table": "books",
  "filters": [{ "col": "title", "op": "eq", "value": "Middlemarch" }],
  "patch": { "finished": true, "rating": 5, "finished_on": "2026-10-20T00:00:00Z" }
}
```

```json Result theme={null}
{ "data": { "updated": 1 } }
```

## Errors

| Code | When |
| - | - |
| `ACCESS_DENIED` | You don't have write access, or the connection is read-only |
| `VALIDATION` | No filters, an empty patch, unknown table or column, updating `id` or `created_at`, a value that doesn't fit its type, setting a required column to `null`, or a row that would exceed 64 KB |
| `QUOTA_EXCEEDED` | The project's storage is full |

<Tip>
  To update one row, filter on its `id`: `[{ "col": "id", "op": "eq", "value": "<uuid>" }]`.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.