I got this statement
UPDATE TABLE_A SET COL_A = COL_B, COL_B = 0
I am curious about the sequence it execute because I expect COL_A should conta
SQL updates are atomic in nature - there is no concept of "sequence" or "order" in which individual columns are updated. You can put them in any order you like, it doesn't matter.
Conceptually, you can think of it taking the "before" state of the row and changing it into the "after" state of the row. So COL_A will be updated with whatever value was in COL_B prior to the update.
This makes it easy to swap two values:
UPDATE test2 SET A=B, B=A;