execute_ddl
Execute a single DDL statement (CREATE, ALTER, DROP) on a specified database and auto-commit. Confirm structure beforehand to avoid irreversible loss.
Instructions
Execute a single DDL statement (CREATE/ALTER/DROP TABLE, CREATE INDEX, etc.) and auto-commit. Before altering or dropping an existing object, call inspect_table or list_objects first to confirm structure. WARNING: DDL is irreversible — dropped tables and columns cannot be recovered. For multiple statements use execute_script. Returns 'DDL executed and committed.' on success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | Database key from list_databases. | |
| sql | Yes | A single DDL statement. No trailing semicolon. |