cockroach sqlfmt changes the textual formatting of one or more SQL queries. It recognizes all SQL extensions supported by CockroachDB.
A web interface to this feature is also available.
This feature is in and subject to change. To share feedback and/or issues, contact Support.
Synopsis
Use the query formatter interactively:Flags
Thesqlfmt command supports the following flags.
Examples
Reformat a query with constrained column width
Using the interactive query formatter, output with the default column width (80 columns):-
Start the interactive query formatter:
- Press Enter.
-
Run the query:
-
Press CTRL+D.
40:

