4 ms·
it does exist and I think it was even added to the SQL standard in some update what FOR UPDATE does is (simplified) to lock a mutex for each row the select sta
by dathinab 3y ago
it does exist and I think it was even added to the SQL standard in some update
what FOR UPDATE does is (simplified) to lock a mutex for each row the select statement returns which are released once the transaction commits
this has the effect that parallel running transactions have to wait until the new computed value is visible before reading it and in turn there is no problem with lost updates
just to be clear this is a very simplified explanation in many ways