The editor sits above the results grid. Type SQL, then run the statement under the cursor or a selection of it.
Run one statement or a whole script
- Ctrl+Enter runs the selection, or the statement under the cursor. Semicolons inside quotes and comments do not split a statement.
- Ctrl+Shift+Enter runs every statement of the draft, or of the selection.
Each statement in a script gets its own small result tab with its line number, status, rows and time. A script stops at the first error, and the statements that did not run are marked Not run. In read-only mode a script of plain reads runs as read-only; a script that contains anything else is refused before any of it runs.
Rows, timeouts and Cancel
Each connection sets a query timeout (15 seconds by default) and a row limit (1,000 by default, up to 100,000). Rows stream into the grid as they arrive, and Cancel (Ctrl+Shift+C) stops a slow query and reports Query cancelled rather than an error.
When a result stops at the row limit it says so. Fetch more reruns the query with twice the rows, and Load all goes up to 100,000 — or use Export to write the complete result to a file.
Drafts, history and .sql files
- Ctrl+N opens a new draft. Each connection keeps up to 32 drafts with their own SQL, selection and last result. Closing a draft that has unsaved text asks first.
- Ctrl+Shift+H opens Query history: every query you ran, with its time, status, rows and duration. Select one to preview it, Open in new draft to reuse it without running it, or Save as snippet to keep it.
- Ctrl+Shift+O opens a
.sqlfile in a new draft, and Ctrl+S saves the draft back to a file.
Snippets and :param placeholders
Snippets are named queries you keep and run again. Ctrl+Shift+K saves the current draft as a snippet; type its name in the command palette to open it in a new draft. Opening a snippet never runs it.
Any query can contain named placeholders such as :status or :min_total:
SELECT id, total_cents
FROM orders
WHERE status = :status AND total_cents >= :min_total
ORDER BY ordered_at DESC;When you run it, Row Patrol asks for each value once. Values are sent to the database as separate parameters, never pasted into the SQL, so a value can never change the statement. Type them without quotes; tick NULL to search for missing values. The last values you used are remembered, so running the same query again is just Enter.
Teams can also share snippets: every .sql file in a project's .sqlclient/queries/ folder appears as a read-only snippet named after the file.
Autocomplete
Suggestions appear as you type a name, after FROM, JOIN, UPDATE, INTO, TABLE or ON, and after alias.. Ctrl+Space opens them anywhere.
- Tables, views and CTEs for the connected engine.
- Columns of the tables in your statement — shared names come in as
alias.name. - Tables that have a foreign key to a table you already joined, with the join condition, after JOIN.
- Functions with their arguments, keywords, types, and your snippets.
Tab accepts a suggestion. Names that need quoting, such as user or Key, are quoted for you. Completion reads only the schema, never your data.
The Inspector
Ctrl+4 opens the Inspector for the selected cell. Its Row view lists every column of that row with its type and value — handy on wide tables — and its Cell view shows one value in full, with Copy and Save full value.
SQL NULL, empty text and the literal text NULL all look different, so you can tell them apart. JSON columns open indented and syntax-highlighted.
Editing comfort
Ctrl+Shift+F tidies whitespace without changing any token. Ctrl+F finds, Ctrl+Alt+F finds and replaces, Ctrl+G jumps to a line, Ctrl+/ comments lines, and Ctrl+D duplicates. Draft → Vim mode gives you Vim-style movement, with i, a, Esc, w/b, gg/G, / and n/N.
