Skip to content Skip to sidebar Skip to footer

Is There A Concurrency With Update Count=count+1?

I wanted to know, will I run into any concurrency problem with this? This is NOT in a transaction. This code is for Sqlite(prototype), but I plan to use it with either MySql or a S

Solution 1:

No this shouldn't be a problem. By default the locking mechanism should take care of any concurrency issues in single statements.

Solution 2:

I may be wrong, but I don't think you would have a problem; the tag_name table I would think would be locked while the UPDATE occurs, so that any other updates waiting to be executed would essentially be queued up rather than occurring concurrently.

Solution 3:

I don't think so, I vaugely remember seeing something like this in a SQL server best practices example from Microsoft.

Solution 4:

not a problem You will have implicit transaction anyway. So it should not be a problem.

Even if you change TRANSACTION ISOLATION LEVEL, it should work just fine, at least on SQLServer.

Post a Comment for "Is There A Concurrency With Update Count=count+1?"