I want to check for a scenario on the database, and then INSERT data if the scenario is met. However, there is a window between the time of the check and the time of the INSERT for someone else to do a check and INSERT (thus compromising the check). Is there any way to lock the database for the time between the check and INSERT?
If so, what is the best technique? Thanks for any help given.
If so, what is the best technique? Thanks for any help given.
Comment