I have a simple table (SQL Server) with one row, and many users can access this row.
If the first user does:
Update Table1
Set Balance = Balance +10
Where FirstName= 'John' //The value in this column is "John" indeed.
Is it possible, that Balance will be updated by this first user, although an other user has entered and changed FirstName to "Dan" AFTER the row with FirstName = "John" was found by first user but BEFORE the changing of balance was done by first user?
I mean:
Rows are locked when they are being modified (and NOLOCK
won't work in an update statement so you don't have to worry about that).
So:
If the first user fires the same update between 2 and 3 then the update will be successful as they still have the necessary row lock.