mirror of
https://github.com/lancedb/lancedb.git
synced 2026-10-16 00:32:26 +00:00
This PR is part of the documentation revamp. Once the full set of PRs is merged, we’ll publish the combined site to staging for review before updating docs.lancedb.com. The curation, SQL and operations pages contain outdated claims and examples that do not reliably work as written. This corrects those pages against the reviewed SDK and local server evidence, including prepared statements, background jobs, cleanup and monitoring. Integration guides are grouped with their examples in #4533. Function and Secret-object documentation stays unpublished until its release. The two Function pages are listed in `.mintignore` and left out of the navigation, and the sections about them on other pages are MDX comments. Stacked on #4533. Each MDX file has one PR owner. Rebase onto main after #4533 is squash-merged. Local assembly, Mint validation and link checks pass, and the assembled site shows no Function or Secret-object content. A local release rehearsal that uncomments the drafts and restores the navigation also passes. Hold publication until this PR and lancedb/sophon#8688 are on `main`.
35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
---
|
|
title: "Update"
|
|
sidebarTitle: "Update"
|
|
description: "UPDATE ... SET ... WHERE — and why it does not recompute derived columns."
|
|
icon: pen
|
|
keywords: ["update", "sql"]
|
|
---
|
|
|
|
<Badge color="red">Enterprise</Badge> [SQL runs in LanceDB Enterprise.](/sql)
|
|
|
|
```sql
|
|
UPDATE documents SET title = upper(title) WHERE category = 'film'
|
|
```
|
|
|
|
Assignments take any expression the [dialect](/sql/functions) supports,
|
|
including references to other columns of the same row. Without a `WHERE`
|
|
clause every row is updated.
|
|
|
|
<Warning>
|
|
An update does not recompute [computed columns](/feature-engineering/add-computed-column)
|
|
that derive from the column you changed. Those rows keep the value computed from
|
|
the old input until the next refresh recomputes them -- see
|
|
[Guarantees](/basics/guarantees#jobs).
|
|
</Warning>
|
|
|
|
Commits a new table version, so [versioning](/management/table#versioning) and
|
|
the [write guarantees](/basics/guarantees#writes) apply -- including that the
|
|
version advances even when the statement affects zero rows.
|
|
|
|
## What to read next {#next}
|
|
|
|
<Card title="Update" icon="pen" href="/ingestion/update">
|
|
The SDK equivalent.
|
|
</Card>
|