SQL editor
Run SQL against a connection, keep the queries you reuse, and work inside a transaction.
Click + in the tab bar and choose New query, or use New query in the Navigator. On desktop, Cmd+T (Ctrl+T) opens the same menu.
A new tab starts with a few comments on its shortcuts and how your database handles transactions, and a few commented-out example queries in your database's SQL to start from. Delete them and the tab stays empty, even after a reload.
Completion knows your tables, columns, and the SQL your database speaks. Errors are underlined as you type. Format in the toolbar tidies the whole tab.
Run SQL
| Action | macOS | Windows / Linux |
|---|---|---|
| Run the selection or the statement under the caret | Cmd+Enter | Ctrl+Enter |
| Run every statement in the tab | Cmd+Shift+Enter | Ctrl+Shift+Enter |
| Save the selection or current statement | Cmd+S | Ctrl+S |
| Save the whole tab | Cmd+Shift+S | Ctrl+Shift+S |
You can also click the play button next to a statement, or Run all in the toolbar. Stop cancels a running query if the engine allows it.
Each statement gets its own result tab with the row count, duration, search, and export. Hover a tab to see which statement it belongs to. A result keeps up to 10,000 rows. A + after the row count means there were more.
If a statement fails, the ones after it are skipped and marked as not run. Fix it and run again.
Before running anything that changes or removes what is already there, Tamery asks. That covers UPDATE, DELETE, DROP, ALTER, TRUNCATE, MERGE, renames, and procedure calls. INSERT and CREATE run right away.
Explain
On PostgreSQL and MySQL, a statement's ⋯ menu has Explain. It shows how the database plans to run the query, without running it.
Save and reuse
Saved holds the queries you saved for this database. They sync to your other devices. Pick one to open it in a new tab. Its actions also let you Append to This Tab, Rename, or Delete it. Saving again creates a new saved query; it never overwrites an old one.
History lists the last 200 statements you ran on this device. Picking one adds it to the current tab, so nothing runs by surprise.
Query logger at the bottom of the Navigator shows every query Tamery itself sent, including the ones behind the table browser. Cmd+J (Ctrl+J) opens it.
Transactions
Run a BEGIN … COMMIT block with Run all, or run BEGIN on its own and go step by step. While a transaction is open, the toolbar shows Commit and Rollback.
Closing the tab, reloading the window, or leaving the transaction idle for 15 minutes rolls it back. An open transaction holds its own database connection and may hold locks, so end it when you are done.
ClickHouse has no transactions. Turso and D1 need the whole block in one run. MySQL commits schema changes immediately, even inside a transaction, and Tamery warns you when that happens. On Oracle, BEGIN starts a PL/SQL block, so each statement commits as it runs; put statements in one BEGIN … END; block to run them together.
Get AI help
These need Pro.
Press Cmd+K (Ctrl+K) for Edit with AI and describe the change in plain words. You can paste a screenshot too. Tamery shows a diff, and you accept or reject it.
When a statement fails, Fix with AI suggests a correction. Press Cmd+I (Ctrl+I) or click the button next to the error.
While you type, a grey suggestion may appear after the caret. Tab accepts it.
The AI sees your schema and, for edits and fixes, the rest of the tab.