say, I've got a one column table table_a:
col
1
and I have two transactions to update it at the same time:
txn1: txn2:
begin; begin;
update table_a set col= col + 1; update table_a set col = col + 1;
end; end;
if two transaction begin at exact the same time,
what's the result of 'col' after both transactions committed
in Read committed level? it's 3 or 2?
My understanding is the result is 3, because the simultaneous update
would still executed one by one, and the second one would read the
"current" value of 'col' to do the update. But I'm not sure.
thank you!
laser