UPDATE examples are tiny finite row modifications; SQL dialect completeness, joins in UPDATE, subqueries, triggers, constraints, transactions, locks, indexes, optimizer behavior, performance, and product behavior are out of scope.
Multiple rows affected: base rows id owner status points note 1 Ada open 10 seed 2 Ben open 20 call 3 Cy done 15 NULL 4 Dee NULL 5 draft
WHERE chooses rows source value compareTo truth keptForUpdate 0 open open TRUE yes 1 open open TRUE yes 2 done open FALSE no 3 NULL open UNKNOWN no
SET assignments column newValue status done
Row-by-row update source matched assignments after 0 yes ({column:status, old:open, new:done}) (1, Ada, done, 10, seed) 1 yes ({column:status, old:open, new:done}) (2, Ben, done, 20, call) 2 no () (3, Cy, done, 15, NULL) 3 no () (4, Dee, NULL, 5, draft)
Rows after UPDATE id owner status points note 1 Ada done 10 seed 2 Ben done 20 call 3 Cy done 15 NULL 4 Dee NULL 5 draft
UPDATE facts fact value baseRowCount 4 finalRowCount 4 matchedRowCount 2 setColumnCount 1 changedCellCount 2 nullAssignmentCount 0 updateStatus applied whereUnknownCount 1