execute_dml
Execute a single INSERT, UPDATE, or DELETE statement with automatic commit. Returns the number of rows affected, and rolls back on any error.
Instructions
Execute a single INSERT, UPDATE, or DELETE statement and commit. If unsure about column names or constraints, call inspect_table first — do not guess schema. Throws and rolls back on error. For multiple statements use execute_script. Returns 'Done. Rows affected: N'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | Database key from list_databases. | |
| sql | Yes | A single INSERT, UPDATE, or DELETE statement. No trailing semicolon. |