SQL Formatter 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.

Sql Formatter Options Sql

Statement Delimiter

  1. Linebreak Before „;“

    • Adds a line break before the statement delimiter (;).
    • This separates the SQL statement from the delimiter, making it visually distinct.
  2. 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.

Small SQL on 1 Line

  1. 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.
Format Sql On One Line

How to Use These Settings

  1. 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.
  2. Optimize Small SQL Statements

    • Set an appropriate character limit for No Linebreak for SQL < X chars to ensure that short statements remain compact.
  3. 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.