INSERT, UPDATE, DELETE¶
These statements modify data in a base. Available since SeaTable version 2.7.
INSERT¶
Appends a new row to a table. INSERT only works with bases that have Big Data storage enabled. Rows are inserted into big data storage.
Enterprise subscription needed
INSERT requires Big Data storage support, which is available only with an Enterprise subscription.
For non-archived bases, use the API functions instead (e.g. Python append_row or JavaScript appendRow).
Syntax¶
column_list: column names in parentheses. If omitted, defaults to all updatable columns.value_list: values in parentheses, matching the column order:(1, "text", 3.0)- Multi-value columns (e.g. multiple select): use nested parentheses:
(1, "text", ("foo", "bar")) - Single/multiple select values must be option names, not keys
Column restrictions¶
These column types cannot be inserted: _id, _ctime (built-in), image, file, formula, link, link-formula, geolocation, auto-number, button.
Example
UPDATE¶
Updates one or multiple rows. Works with both normal and big data storage.
Syntax¶
No WHERE = update all rows
If you omit the WHERE clause, all rows will be updated.
Only constant values in SET
The value in SET must be a constant (string, number, or boolean). Functions, arithmetic expressions, and column references are not supported in SET. They can only be used in SELECT and WHERE.
The same column restrictions and multi-value rules as INSERT apply.
Example
DELETE¶
Deletes one or multiple rows. Works with both normal and big data storage.
Syntax¶
No WHERE = delete all rows
If you omit the WHERE clause, all rows will be deleted.
Example