Execute Query
execute_queryRun SQL queries on DuckDB or MotherDuck databases. Unqualified table names resolve automatically to the current database and schema.
Instructions
Execute a SQL query on the DuckDB or MotherDuck database. Unqualified table names resolve to current_database() and current_schema() automatically. Fully qualified names (database.schema.table) are only needed when multiple DuckDB databases are attached or when connected to MotherDuck.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQL query to execute (DuckDB SQL dialect) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |