SQL Formatter Options
SELECT
Linebreak options for every clause of a SELECT statement, clause by clause: SELECT, FROM, INTO, WHERE, HAVING, GROUP BY, ORDER BY, WINDOW, OFFSET and the set operators UNION, EXCEPT and INTERSECT. Each clause has a Linebreak Before and a Linebreak After switch, which together decide whether the keyword gets its own line.
SELECT
| ID | Option | What it does | Default |
|---|---|---|---|
| ID148 | FreeLinebreak After SELECT LBA_SELECT | Starts the column list on the line after the SELECT keyword instead of on the same line. | on |
ID148 off
select dept_nbr, dept_name from dept
ID148 on
select dept_nbr, dept_name from dept
FROM
| ID | Option | What it does | Default |
|---|---|---|---|
| ID182 | FreeLinebreak Before FROM LBB_FROM | Puts FROM on a new line, separating the column list from the table list. | on |
| ID143 | FreeLinebreak After FROM LBA_FROM | Starts the table list on the line after FROM. Switch on when queries regularly read from several tables. | on |
ID182 off, ID143 off
select dept_nbr from dept, employee
ID182 on, ID143 on
select dept_nbr from dept, employee
INTO
| ID | Option | What it does | Default |
|---|---|---|---|
| ID185 | FreeLinebreak Before INTO LBB_INTO | Puts INTO on a new line. Applies to SELECT … INTO in procedural code and to INSERT INTO. | on |
| ID159 | FreeLinebreak After INTO LBA_INTO | Starts the target list on the line after INTO. | on |
ID185 off, ID159 off
insert into employee (emp_nbr, emp_name) values (1, 'Smith')
ID185 on, ID159 on
insert into employee (emp_nbr, emp_name) values (1, 'Smith')
WHERE
The WHERE clause has two independent levels: the position of the WHERE keyword itself, and the treatment of the AND / OR operators that join the individual conditions.
WHERE
| ID | Option | What it does | Default |
|---|---|---|---|
| ID183 | FreeLinebreak Before WHERE LBB_WHERE | Puts WHERE on a new line, which marks the beginning of the filter section. | on |
| ID142 | FreeLinebreak After WHERE LBA_WHERE | Starts the first condition on the line after WHERE. Combined with the option before, WHERE then occupies a line of its own. | on |
ID183 off, ID142 off
select dept_nbr from dept where dept_zip = '64521'
ID183 on, ID142 on
select dept_nbr from dept where dept_zip = '64521'
WHERE Condition
| ID | Option | What it does | Default |
|---|---|---|---|
| ID172 | FreeLinebreak Before AND/OR in WHERE Condition LBB_WHERE_AND | Starts each new condition on its own line with the AND or OR leading it. Leading operators make the boolean structure of a long filter easy to scan. | on |
| ID173 | FreeLinebreak After AND/OR in WHERE Condition LBA_WHERE_AND | Puts the condition on the line after the operator, so that the operator alone terminates the previous line. | off |
| ID174 | FreeIndent AND/OR in WHERE Condition IND_WHERE_AND | Indents the AND / OR operators one level deeper than the WHERE keyword, which subordinates the conditions to the clause visually. | off |
Leading AND / OR operators make the boolean structure of a long filter readable top to bottom.
ID172 off
where dept_zip = '64521' and dept_nbr > 100 and active = 1
ID172 on, ID174 on
where dept_zip = '64521' and dept_nbr > 100 and active = 1
HAVING
HAVING mirrors WHERE exactly, but filters after aggregation. The options are deliberately separate so you can format the two clauses differently.
HAVING
| ID | Option | What it does | Default |
|---|---|---|---|
| ID184 | FreeLinebreak Before HAVING LBB_HAVING | Puts HAVING on a new line. | on |
| ID153 | FreeLinebreak After HAVING LBA_HAVING | Starts the first condition on the line after HAVING. | on |
ID184 off, ID153 off
select dept_nbr, sum(salary) from employee group by dept_nbr having sum(salary) > 100000
ID184 on, ID153 on
select dept_nbr, sum(salary) from employee group by dept_nbr having sum(salary) > 100000
HAVING Condition
| ID | Option | What it does | Default |
|---|---|---|---|
| ID175 | FreeLinebreak Before AND/OR in HAVING Condition LBB_HAVING_AND | Starts each condition of the HAVING clause on its own line, led by AND or OR. | on |
| ID176 | FreeLinebreak After AND/OR in HAVING Condition LBA_HAVING_AND | Puts the condition on the line after the operator. | off |
| ID177 | FreeIndent AND/OR in HAVING Condition IND_HAVING_AND | Indents the AND / OR operators of the HAVING clause one level deeper. | off |
ID175 off
having sum(salary) > 100000 and count(*) > 5
ID175 on, ID177 on
having sum(salary) > 100000 and count(*) > 5
GROUP BY
| ID | Option | What it does | Default |
|---|---|---|---|
| ID186 | FreeLinebreak Before GROUP BY LBB_GROUPBY | Puts GROUP BY on a new line. | on |
| ID145 | FreeLinebreak After GROUP BY LBA_GROUPBY | Starts the grouping list on the line after GROUP BY. | on |
| ID135 | FreeStack GROUP BY LB_STACKLISTGROUPBY | Stacks the grouping columns one per line instead of running them together. Makes it obvious whether the GROUP BY matches the non-aggregated columns of the SELECT list. | on |
ID135 stacks the grouping columns, which makes it obvious whether they match the non-aggregated columns of the SELECT list.
ID186 off, ID135 off
select dept_nbr, job, sum(salary) from employee group by dept_nbr, job
ID186 on, ID145 on, ID135 on
select dept_nbr, job, sum(salary) from employee group by dept_nbr, job
ORDER BY
| ID | Option | What it does | Default |
|---|---|---|---|
| ID187 | FreeLinebreak Before ORDER BY LBB_ORDERBY | Puts ORDER BY on a new line. | on |
| ID144 | FreeLinebreak After ORDER BY LBA_ORDERBY | Starts the sort list on the line after ORDER BY. | on |
| ID136 | FreeStack ORDER BY LB_STACKLISTORDERBY | Stacks the sort columns one per line, so that each column with its ASC or DESC is visible on its own. | on |
ID187 off, ID136 off
select dept_nbr from dept order by dept_name desc, dept_nbr
ID187 on, ID144 on, ID136 on
select dept_nbr from dept order by dept_name desc, dept_nbr
WINDOW
| ID | Option | What it does | Default |
|---|---|---|---|
| ID258 | FreeLinebreak Before WINDOW LBB_WINDOW | Puts the WINDOW clause on a new line. WINDOW names a window definition once so several analytic functions can reuse it. | on |
ID258 off
select rank() over w from employee window w as (order by salary desc)
ID258 on
select rank() over w from employee window w as (order by salary desc)
OFFSET
| ID | Option | What it does | Default |
|---|---|---|---|
| ID257 | FreeLinebreak Before OFFSET LBB_OFFSET | Puts OFFSET on a new line, together with the FETCH or LIMIT clause that usually follows it. | on |
ID257 off
select emp_name from employee order by emp_name offset 10 rows fetch next 20 rows only
ID257 on
select emp_name from employee order by emp_name offset 10 rows fetch next 20 rows only
UNION, EXCEPT, INTERSECT
| ID | Option | What it does | Default |
|---|---|---|---|
| ID256 | FreeLinebreak Before UNION, EXCEPT, INTERSECT LBB_UNION | Puts the set operator on a new line, so it separates the two queries it combines. Mutually exclusive with ID011. | on |
| ID011 | FreeDouble Linebreak before/after UNION, EXCEPT, INTERSECT LB_DOUBLEUNION | Surrounds the set operator with blank lines. In a chain of several UNIONs this is what makes the individual queries recognisable as blocks. Mutually exclusive with ID256. | on |
ID011 surrounds the operator with blank lines, which turns a chain of set operations into readable blocks.
ID256 off, ID011 off
select dept_nbr from dept union select dept_nbr from dept_archive
ID256 on, ID011 on
select dept_nbr from dept union select dept_nbr from dept_archive
Option IDs are identical across all SQLinForm editions (VS Code, JetBrains, SSMS, Notepad++, Online Formatter) and are the keys stored inside a profile file. Generated from properties.json 2026.8.21.0.