SQL Formatter Options

IF THEN ELSE & Conditions

Procedural code inside a stored procedure follows different rules from a SELECT statement. These options format IF / THEN / ELSE blocks, the BEGIN…END blocks nested within them, and the boolean conditions those blocks test.

IF THEN ELSE

IF
IDOptionWhat it doesDefault
ID037ProLinebreak After IF
LBA_IF
Starts the condition on the line after the IF keyword. Off by default, because a short condition reads well next to its IF.off
ID037 off
if v_salary > 5000 then
ID037 on
if
    v_salary > 5000 then
THEN
IDOptionWhat it doesDefault
ID038ProLinebreak Before THEN
LBB_IF_THEN
Puts THEN on a new line, so it terminates the condition rather than trailing it.on
ID039ProLinebreak After THEN
LBA_IF_THEN
Starts the block body on the line after THEN.on
ID038 off, ID039 off
if v_salary > 5000 then v_band := 'high';
ID038 on, ID039 on
if v_salary > 5000
then
    v_band := 'high';
ELSE
IDOptionWhat it doesDefault
ID041ProLinebreak After ELSE
LBA_IF_ELSE
Starts the block body on the line after ELSE.on
ID024ProIndent THEN
IND_IF_THEN
Indents the statements of the THEN branch one level deeper than the IF.off
ID025ProIndent ELSE
IND_IF_ELSE
Indents the statements of the ELSE branch one level deeper.off
ID030ProIndent BEGIN
IND_BEGIN_END
Indents the contents of a BEGIN…END block one level deeper. Applies to blocks in IF, ELSE, WHILE, LOOP and similar constructs, and is what makes the nesting of procedural code visible.off

ID024 and ID025 are what make the nesting of procedural code visible.

ID024 off, ID025 off
if v_salary > 5000 then
v_band := 'high';
else
v_band := 'low';
end if;
ID024 on, ID025 on
if v_salary > 5000 then
    v_band := 'high';
else
    v_band := 'low';
end if;

Tip: ID030 does the same for BEGIN…END blocks nested inside IF, ELSE, WHILE and LOOP constructs.

Conditions

IDOptionWhat it doesDefault
ID014ProLinebreak Before AND/OR
LBB_AND
Starts each condition on its own line, led by AND or OR.on
ID015ProLinebreak After AND/OR
LBA_AND
Puts the condition on the line after the operator.on
ID014 off
if v_salary > 5000 and v_job = 'MGR' and v_active = 1 then
ID014 on
if v_salary > 5000
   and v_job = 'MGR'
   and v_active = 1 then
Conditions
IDOptionWhat it doesDefault
ID093ProLinebreak Before '('
SP_LBB_OPENCONDITIONBR
Puts the opening bracket of a condition group on a new line.on
ID094ProLinebreak After '('
SP_LBA_OPENCONDITIONBR
Starts the first condition on the line after the opening bracket.on
ID097ProIndent Conditions in Brackets
SP_IND_CONDITIONBR
Indents the conditions inside the brackets one level deeper.on
ID098ProLinebreak Before ')'
SP_LBB_CLOSECONDITIONBR
Puts the closing bracket on a new line.on
ID099ProLinebreak After ')'
SP_LBA_CLOSECONDITIONBR
Starts whatever follows on the line after the closing bracket.on
ID139ProAlign Comparison Operators (=,<>,>,<,>=,<=) in Conditions
SP_ALI_EQUAL
Aligns the comparison operators inside conditions into a column, so the compared values form a readable right-hand column.on

ID139 additionally aligns the comparison operators, so the tested values form a readable right-hand column.

ID094 off, ID097 off, ID139 off
if (v_salary > 5000 and v_job = 'MGR' and v_dept = 10) then
ID094 on, ID097 on, ID139 on
if
(
    v_salary > 5000
    and v_job   = 'MGR'
    and v_dept  = 10
)
then

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.