SQL Formatter Options
Options
SQL
The SQL Options in the SQL Formatter Tool allow you to configure the formatting of SQL statements, focusing on statement delimiters and line breaks for small SQL statements. These settings help improve readability and consistency in SQL scripts.
Statement Delimiter
Linebreak Before „;“
- Adds a line break before the statement delimiter (
;
). - This separates the SQL statement from the delimiter, making it visually distinct.
- Adds a line break before the statement delimiter (
Double Linebreak After „;“
- Adds two line breaks after the statement delimiter (
;
). - This creates extra space between SQL statements, improving readability in scripts with multiple statements.
- Adds two line breaks after the statement delimiter (
Small SQL on 1 Line
- No Linebreak for SQL < X chars
- Keeps small SQL statements (e.g., those under 10 characters) on a single line to avoid unnecessary line breaks.
- Adjust the character limit using the
-10
and+10
buttons to define what qualifies as a „small“ SQL statement.
How to Use These Settings
Customize Statement Delimiters
- Enable Linebreak Before „;“ to visually separate SQL statements from their delimiters.
- Enable Double Linebreak After „;“ to clearly distinguish consecutive SQL statements in longer scripts.
Optimize Small SQL Statements
- Set an appropriate character limit for No Linebreak for SQL < X chars to ensure that short statements remain compact.
Combine Settings
- Use both delimiter and small SQL settings together to create clean, structured, and visually appealing SQL scripts.
Tips for Optimal Usage
- Enable Double Linebreak After „;“ for better readability in scripts with multiple SQL statements.
- Use No Linebreak for SQL < X chars to keep short statements compact and avoid unnecessary formatting.
- Adjust the character limit for small SQL statements based on your project’s coding style and complexity.