Supported Tools
| Tool | Command Name | Description | PostgreSQL | MySQL | MariaDB | SQL Server | SQLite |
|---|---|---|---|---|---|---|---|
| Execute SQL | execute_sql | Execute single or multiple SQL statements (separated by semicolons) | ✅ | ✅ | ✅ | ✅ | ✅ |
Execute SQL
Execute SQL queries and statements on your database.Features
- Single statements: Execute a single SQL query or command
- Multiple statements: Separate multiple statements with semicolons (
;) - Transactions: Wrap operations in
BEGIN/COMMITblocks for atomic execution - Read-only mode: When enabled with
--readonlyflag, only SELECT and read-only operations are allowed - Row limiting: Configure
--max-rowsto limit SELECT query results
Single Query
Execute a single SELECT, INSERT, UPDATE, or DELETE statement.Multiple Statements
Execute multiple SQL statements in sequence by separating them with semicolons.Each statement is executed sequentially. If one statement fails, subsequent statements may not be executed depending on the database error handling.
Transactions
Wrap multiple operations in a transaction to ensure atomicity. UseBEGIN/COMMIT for successful transactions or ROLLBACK to undo changes.
DDL Operations
Create, alter, or drop database objects.Read-Only Mode
Enable read-only mode to restrict SQL execution to safe, read-only operations:SELECTqueriesSHOWcommandsDESCRIBEcommandsEXPLAINqueries- Other read-only operations
Row Limiting
Limit the number of rows returned from SELECT queries to prevent accidentally retrieving too much data:- Only applied to SELECT statements, not INSERT/UPDATE/DELETE
- If your query already has a
LIMITorTOPclause, DBHub uses the smaller value - Can be configured per-database in multi-database TOML configuration