Data Manipulation (DML)
Standard SQL data manipulation commands for reading and writing data.
DML permission and routing behavior depends on table type. For USER, SHARED, STREAM, and
SYSTEM access rules, see /docs/server/architecture/table-types.
INSERT
Insert one or more rows into a table:
Batch Insert
Examples
UPDATE
Example
DELETE
Example
Explicit Transactions
KalamDB stays in autocommit mode by default. Use explicit transaction blocks when you need PostgreSQL-style atomic multi-statement writes.
Syntax
Commit example
Rollback example
Within the open transaction, reads see the staged writes from that same transaction. After ROLLBACK, those staged changes are discarded.
Rules and limits
- Explicit transactions currently support
USERandSHAREDtables. STREAMtables andsystem.*tables are rejected inside explicit transactions.- DDL statements are not supported inside explicit transactions.
- Nested
BEGINand savepoints are not supported in this phase. - A single
/v1/api/sqlrequest can contain multiple sequentialBEGIN ... COMMITorBEGIN ... ROLLBACKblocks. - If a
/v1/api/sqlrequest ends with an open transaction, KalamDB rolls it back automatically.
To inspect live transaction state, query system.transactions. For pg-extension-specific session
state, use system.sessions. See
/docs/server/sql-reference/system-views.
For deeper read-query patterns (joins, CTEs, and DataFusion-compatible advanced SELECT usage), see /docs/server/sql-reference/query-data.