SQL Formatter Options
Options
White Spaces
The White Spaces settings in the SQL Formatter Tool allow you to control the use of white spaces in your SQL scripts. These options help enhance readability, reduce unnecessary spaces, and maintain a clean, structured format.
General Indention
Keep 1st Line Indention
- Retains the indentation of the first line of the SQL statement, ensuring that initial formatting is preserved.
Add Initial Indention
- Specifies the number of spaces or tabs to add as an initial indentation for all SQL statements.
- Use the
-4
and+4
buttons to decrease or increase the indentation incrementally.
White Spaces
Around Commas
- Controls how white spaces are handled around commas in SQL lists (e.g., in
SELECT
orVALUES
clauses). - Options:
- Keep unchanged: Retains the original spacing around commas.
- Add space: Ensures a space is added after each comma.
- Remove space: Removes any space around commas.
- Controls how white spaces are handled around commas in SQL lists (e.g., in
Around Brackets
- Adjusts the spacing around parentheses or square brackets in SQL statements.
- Options:
- Keep unchanged: Retains the original spacing.
- Add space: Adds a space around brackets.
- Remove space: Removes all spaces around brackets.
Around Operators
- Defines the spacing around SQL operators (e.g.,
=
,+
,-
,AND
,OR
). - Options:
- Keep unchanged: Maintains the existing spacing.
- Add space: Adds spaces around operators.
- Remove space: Removes any spaces around operators.
- Defines the spacing around SQL operators (e.g.,
Blank Lines
- Manages blank lines in the SQL script.
- Options:
- Keep unchanged: Retains the original blank lines.
- Keep one: Ensures only one blank line between sections.
- Keep none: Removes all blank lines.
Additional Options
Remove Unnecessary White Spaces
- Automatically detects and removes extra or redundant white spaces throughout the SQL script.
Remove White Space Before
]
- Removes any spaces immediately preceding the closing square bracket (
]
). - Useful for cleaning up array or indexed column references.
- Removes any spaces immediately preceding the closing square bracket (
.