How to exclusively lock a row that prevent CRUD operation

前端 未结 5 1806
無奈伤痛
無奈伤痛 2021-01-11 15:56

Hi expert how I can lock a row in sql server that prevent CRUD operation even SELECT. Is it Possible? Serializable Isolation level does not prevent SELECT. thanks

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-11 16:44

    SQL Server already natively locks a record from dirty reads as it is being updated. This has the effect of blocking the select call until the update / insert call is complete.

提交回复
热议问题