Run Read-Only SQL Query
run_queryExecute read-only SQL queries (SELECT, WITH, SHOW, DESCRIBE, EXPLAIN) across multiple database engines without modifying data.
Instructions
Execute a read-only SQL query (SELECT, WITH, and the engine's SHOW, DESCRIBE or EXPLAIN) on a MySQL, MariaDB, PostgreSQL, SQLite, SQL Server or ClickHouse connection
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | SQL query to execute, in the active engine's dialect | |
| database | No | Optional database to read from for this call only, without changing the active connection |