Skip to content

Commit 3cf6502

Browse files
christophdbclaude
andcommitted
Split SQL UPDATE and DELETE into separate documentation pages
Replaces the combined insert-update-delete.md with dedicated update.md and delete.md pages for better navigation and discoverability. Enriches both pages with verified behavior: response format, LIMIT not supported, SET to NULL, and cross-references to existing docs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 87c4a7f commit 3cf6502

4 files changed

Lines changed: 107 additions & 61 deletions

File tree

‎docs/sql/delete.md‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
description: SeaTable SQL DELETE syntax — remove rows with WHERE conditions.
3+
---
4+
5+
# DELETE
6+
7+
Deletes one or more rows from a table. Works with both normal and Big Data storage.
8+
9+
## Syntax
10+
11+
```sql
12+
DELETE FROM tableName
13+
[WHERE ...]
14+
```
15+
16+
!!! warning "No WHERE = delete all rows"
17+
18+
If you omit the WHERE clause, **all rows** in the table will be deleted.
19+
20+
`LIMIT` is not supported in `DELETE` statements.
21+
22+
## Response
23+
24+
`DELETE` returns `success: true` on success. The response does not include the number of deleted rows. If no rows match the WHERE condition, the response is still `success: true`.
25+
26+
```json
27+
{
28+
"success": true,
29+
"metadata": null,
30+
"results": null
31+
}
32+
```
33+
34+
## Examples
35+
36+
Delete rows matching a condition:
37+
38+
```sql
39+
DELETE FROM Contacts WHERE Age<18
40+
```
41+
42+
Delete rows with empty values:
43+
44+
```sql
45+
DELETE FROM Contacts WHERE City IS NULL
46+
```

‎docs/sql/insert-update-delete.md‎

Lines changed: 0 additions & 60 deletions
This file was deleted.

‎docs/sql/update.md‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
description: SeaTable SQL UPDATE syntax — modify rows with WHERE conditions and constant values.
3+
---
4+
5+
# UPDATE
6+
7+
Updates one or more rows in a table. Works with both normal and Big Data storage.
8+
9+
## Syntax
10+
11+
```sql
12+
UPDATE tableName
13+
SET column1 = value [, column2 = value, ...]
14+
[WHERE ...]
15+
```
16+
17+
!!! warning "No WHERE = update all rows"
18+
19+
If you omit the WHERE clause, **all rows** in the table will be updated.
20+
21+
The `value` in SET must be a **constant** (string, number, or boolean). Expressions and [functions](functions.md) are not supported in SET — see [not supported features](index.md#not-supported) for alternatives.
22+
23+
The same column restrictions and multi-value rules as [INSERT](insert.md) apply. Not all column types can be written via SQL — see [column writability](limitations.md#column-writability) for details.
24+
25+
`LIMIT` is not supported in `UPDATE` statements.
26+
27+
## Setting values to NULL
28+
29+
To clear a cell, set the column to `NULL`. Setting a text column to an empty string `""` also results in NULL — see [NULL values](limitations.md#null-values).
30+
31+
```sql
32+
UPDATE Contacts SET City=NULL WHERE Name="Alice"
33+
```
34+
35+
## Response
36+
37+
`UPDATE` returns `success: true` on success. The response does not include the number of affected rows. If no rows match the WHERE condition, the response is still `success: true`.
38+
39+
```json
40+
{
41+
"success": true,
42+
"metadata": null,
43+
"results": null
44+
}
45+
```
46+
47+
## Examples
48+
49+
Update a single column:
50+
51+
```sql
52+
UPDATE Contacts SET Adult=true WHERE Age>=18
53+
```
54+
55+
Update multiple columns at once:
56+
57+
```sql
58+
UPDATE Contacts SET Adult=true, `Age group`="18+" WHERE Age>=18
59+
```

‎mkdocs.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ nav:
232232
- sql/index.md
233233
- SELECT: sql/select.md
234234
- INSERT: sql/insert.md
235-
- UPDATE, DELETE: sql/insert-update-delete.md
235+
- UPDATE: sql/update.md
236+
- DELETE: sql/delete.md
236237
- Limitations: sql/limitations.md
237238
- Functions: sql/functions.md
238239
- Plugin Development:

0 commit comments

Comments
 (0)