SQL Formatter Options

MERGE

A MERGE statement combines a target, a source, a join condition and several conditional branches in one command, which makes it one of the longest statements in everyday SQL. These options break it into its constituent clauses – MERGE, USING, ON, WHEN and THEN – so the structure stays visible.

MERGE

MERGE
IDOptionWhat it doesDefault
ID213ProLinebreak After MERGE
LBA_MERGE
Starts the target table on the line after the MERGE keyword.on

A complete MERGE with all options on this page at their defaults. The groups below cover each clause in turn.

merge
into   employee tgt
using  employee_staging src
on     (tgt.emp_nbr = src.emp_nbr)
when matched then
    update set tgt.salary = src.salary
when not matched then
    insert (emp_nbr, emp_name)
    values (src.emp_nbr, src.emp_name)
USING
IDOptionWhat it doesDefault
ID214ProLinebreak Before USING
LBB_MERGE_USING
Puts USING on a new line, which separates the source from the target.on
ID215ProLinebreak After USING
LBA_MERGE_USING
Starts the source – a table or a complete subquery – on the line after USING.on
ID214 off, ID215 off
into employee tgt using employee_staging src
ID214 on, ID215 on
into employee tgt
using
    employee_staging src
ON
IDOptionWhat it doesDefault
ID216ProLinebreak Before ON
LBB_MERGE_ON
Puts ON on a new line, separating the match condition from the source.on
ID217ProLinebreak After ON
LBA_MERGE_ON
Starts the match condition on the line after ON.off
ID216 off
using employee_staging src on (tgt.emp_nbr = src.emp_nbr)
ID216 on
using employee_staging src
on (tgt.emp_nbr = src.emp_nbr)
ON Condition
IDOptionWhat it doesDefault
ID218ProLinebreak Before AND/OR in ON Condition
LBB_MERGEON_AND
Starts each additional part of the match condition on its own line, led by AND or OR.off
ID219ProLinebreak After AND/OR in ON Condition
LBA_MERGEON_AND
Puts the condition on the line after the operator.off
ID220ProIndent AND/OR in ON Condition
IND_MERGEON_AND
Indents the AND / OR operators of the ON condition one level deeper.off
ID218 off
on (tgt.emp_nbr = src.emp_nbr and tgt.region = src.region)
ID218 on, ID220 on
on (tgt.emp_nbr = src.emp_nbr
        and tgt.region = src.region)
WHEN Condition
IDOptionWhat it doesDefault
ID221ProLinebreak Before AND/OR in WHEN Condition
LBB_MERGEWHEN_AND
Starts each additional part of a WHEN MATCHED AND … condition on its own line.off
ID222ProLinebreak After AND/OR in WHEN Condition
LBA_MERGEWHEN_AND
Puts the condition on the line after the operator.off
ID223ProIndent AND/OR in WHEN Condition
IND_MERGEWHEN_AND
Indents the AND / OR operators of the WHEN condition one level deeper.off
ID221 off
when matched and src.salary > 0 and src.active = 1 then
ID221 on
when matched
     and src.salary > 0
     and src.active = 1 then
THEN
IDOptionWhat it doesDefault
ID224ProLinebreak Before THEN
LBB_MERGEWHEN_THEN
Puts THEN on a new line, separating the condition of a branch from the action it triggers.off
ID224 off
when matched then
    update set tgt.salary = src.salary
ID224 on
when matched
then
    update set tgt.salary = src.salary

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.