外观
本页尚未翻译
本页内容仍为英文原文,源自官方文档 sql/dml/delete。中文翻译正在分批进行中。
Delete
DELETE FROM ... WHERE: rows are marked, not erased.
Applies to: Embedded ❌, Enterprise ✅
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.
Commits a new table version, so versioning and the write guarantees apply, including that the version advances even when the statement affects zero rows.