After updating a field, get the updated value.

xiaoxiao2021-04-02  255

After updating a field, the updated value is obtained, which ensures that the value obtained is unique when concurrent operation, and does not need to lock. Because if you adopt, first select the Upddate, you cannot guarantee uniqueness of the taking the row. Unless you lock. code show as below:

Update dbo.sysdata set pono = pono 1, @ponumber = pono 1

转载请注明原文地址:https://www.9cbs.com/read-131385.html

New Post(0)