INSERT — single-row and multi-row VALUES, INSERT ... SELECT, with a
hanging-paren wrap for long column/value lists.
UPDATE, DELETE.
MERGE — USING/ON/WHEN ... THEN with UPDATE SET (aligned =
signs), DELETE, and INSERT/VALUES actions.
WITH / CTEs — single or multiple CTEs (including WITH RECURSIVE),
followed by any supported statement.
Case-normalizes reserved keywords to uppercase; identifiers and string
literals are left exactly as written.
Usage
Format Document: click the format icon in the editor toolbar, or run
the command "Format SQL (River Style)" from the Command Palette.
Format Selection: select some SQL, right-click, and choose
"Format SQL Selection".
Minify Selection: select some SQL, right-click, and choose
"Minify SQL Selection (Single Line)" to collapse it down to one line
per statement — the inverse of formatting, handy for pasting a query into
a one-liner script or log. Works on both formatted and unformatted input;
comments are dropped.
Minify Document: run "Minify SQL Document (Single Line)" from the
Command Palette to do the same for the whole file.
Applies to files recognized as the sql language, including .sql,
.dml, and .ddl files.
Configuration
Setting
Default
Description
sqlFormatter.maxLineLength
100
Maximum line length before length-triggered lists (GROUP BY/ORDER BY columns, INSERT column/VALUES lists, PARTITION BY/ORDER BY in window functions) wrap one item per line.