- Why the dialect setting matters
- Each dialect has keywords and syntax the others lack, MySQL backtick quoting, T-SQL square brackets, PostgreSQL's :: casts and dollar-quoted strings, BigQuery's array and struct syntax. Choosing correctly means those are recognised as syntax rather than treated as opaque text.
- Keyword casing is a convention, not a requirement
- SQL keywords are case-insensitive, so casing is purely for readability. Uppercase keywords against lowercase identifiers is the long-standing convention and the default here, because it makes structure scannable at a glance. Choose "preserve" if your team has settled on something else.
- Formatting never changes what a query does
- Only whitespace and keyword casing change. String literals, identifiers and comments are left exactly as written, including whitespace inside a quoted string, which is data. The formatted query is semantically identical to the original.
- Multiple statements and tabular alignment
- A script containing several statements separated by semicolons is formatted as a whole, with blank lines between statements. The optional tabular style aligns clause keywords in a left-hand column, which some teams prefer for long SELECT lists.
- What the formatter cannot do
- It formats; it does not validate. A query with a genuine logic error still formats cleanly. Syntax too malformed to tokenise produces an error, but that is a parsing limit rather than a correctness check, use your database's EXPLAIN to verify a query actually works.