Skip to main content

Align SET Equals

When alignTokens includes =, = signs are vertically aligned across SET assignments in UPDATE statements.

Basic alignment with varying target widths

update t set a = 1, bb = 2, ccc = 3 where id = 1
update t set a = 1, bb = 2, ccc = 3 where id = 1

Single assignment — no alignment

update t set a = 1 where id = 1
update t set a = 1 where id = 1

With WHERE clause after SET

update employees set salary = 50000, department = 'Engineering', title = 'Senior' where id = 42
update
employees
set salary = 50000, department = 'Engineering', title = 'Senior'
where id = 42

Disabled by default

update t set a = 1, bb = 2, ccc = 3 where id = 1
update t set a = 1, bb = 2, ccc = 3 where id = 1

Idempotency

UPDATE T
SET A = 1,
BB = 2,
CCC = 3
WHERE ID = 1
update t set a = 1, bb = 2, ccc = 3 where id = 1