mirror of
https://github.com/lancedb/lancedb.git
synced 2026-10-20 18:52:28 +00:00
The existing docs have 254 findings from our shared Vale rules. Contributors would otherwise inherit these when editing the same lines. Clean up the prose across 80 pages: correct product names and a repeated word, simplify a few phrases, and replace dashes with punctuation that fits each sentence. The pinned Vale scan now reports zero findings, with no suppressions.
32 lines
1.0 KiB
Plaintext
32 lines
1.0 KiB
Plaintext
---
|
|
title: "Delete"
|
|
sidebarTitle: "Delete"
|
|
description: "DELETE FROM ... WHERE: rows are marked, not erased."
|
|
icon: trash
|
|
keywords: ["delete", "sql"]
|
|
---
|
|
|
|
<Badge color="red">Enterprise</Badge> [SQL runs in LanceDB Enterprise.](/sql)
|
|
|
|
```sql
|
|
DELETE FROM documents WHERE created_at < TIMESTAMP '2025-01-01 00:00:00'
|
|
```
|
|
|
|
Compare a timestamp column with a typed literal, as above, or with
|
|
`CAST('2025-01-01' AS TIMESTAMP)`. A bare string such as `'2025-01-01'` is
|
|
rejected in a `DELETE` predicate, even though a `SELECT` accepts it.
|
|
|
|
Deletion marks rows rather than erasing them, so the data remains recoverable
|
|
for as long as the version holding it survives
|
|
[retention](/maintenance/cleanup).
|
|
|
|
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="Delete" icon="trash" href="/ingestion/delete">
|
|
The SDK equivalent.
|
|
</Card>
|