SQL Formatter Options

Output Format

The Output Options in the SQL Formatter Tool allow you to control the layout and formatting rules for the SQL output. These settings enable you to fine-tune the maximum line length and manage sections of code where formatting is intentionally disabled.

05 Output Sql Formatter Options
Max Line Length
  • Sets the maximum number of characters per line in the formatted SQL output.
  • The default value is 9999, which allows very long lines.
  • You can adjust the value:
    • Use the -10 or +10 buttons to decrease or increase the line length incrementally.
    • Choose preset values such as 30, 80, 132, or enter a custom value (>= 30).

Use Case:

    • Shorter line lengths (e.g., 80) improve readability, especially in environments with limited screen space.
    • Longer line lengths allow for denser, more compact formatting.

Formatting On/Off

No Formatting Between

  • Enables the ability to exclude specific sections of SQL code from formatting.
  • When checked, the formatter will ignore the code between two specified markers:
    • -- FORMAT_OFF: Marks the beginning of the unformatted section.
    • -- FORMAT_ON: Marks the end of the unformatted section.

Use Case:

    • Useful when certain SQL sections (e.g., legacy code, preformatted blocks, or comments) must retain their original formatting.