SQL Editor
The editor is based on Monaco and includes schema-aware autocomplete so tables and columns from the connected source are suggested as you type.
Actions
- Run —
Mod+Enteror the toolbar ▶ button executes the query (fastest path is a new tab withMod+Shift+Enter). With the cursor on a CTE name, Run previews that intermediate table (see below). - Format —
Shift+Alt+Fformats the document;Mod+KthenMod+Fformats the selection. - EXPLAIN — inspect the execution plan of the current query.
- SQL bookmarks — save and jump between marked statements.
The editor remembers scroll position and cursor per tab. Switching away and back, or reopening Duckling with the same tab, restores where you left off.
Preview a CTE
Put the cursor on a CTE name (or select only that identifier) and Run. Duckling keeps every CTE up to that name and executes SELECT * FROM <cte> without changing the editor text. The ▶ and new-tab buttons switch to the primary color with a CTE badge, the tooltip becomes Run CTE sales, and the result tab is titled CTE sales.
Selecting a SQL fragment (more than one identifier) still runs the selection as-is.
Statement split
An optional per-statement split mode (toolbar toggle, default off) runs and highlights only the statement at the cursor. When split is on, a semicolon lexer combined with tree-sitter locates statement nodes, and complex SQL that tree-sitter truncates safely falls back to the lexer result. See the Statement Split guide for details.
Toolbar helpers
{}button — scans the current selection (or the full buffer) for{{ name }}placeholders and inserts or updates a/* @vars */block. See SQL Templates.

