This is an over-simplified explanation of what I\'m working on.
I have a table with status column. Multiple instances of the application will pull the contents of the f
Not quite, but you can SELECT ... WITH (UPDLOCK)
, then UPDATE..
subsequently. This is as good as an atomic operation as it tells the database that you are about to update what you previously selected, so it can lock those rows, preventing collisions with other clients. Under Oracle and some other database (MySQL I think) the syntax is SELECT ... FOR UPDATE
.
Note: I think you'll need to ensure the two statements happen within a transaction for it to work.