Mutex analog in SQL?

戏子无情 提交于 2019-12-01 10:53:52

问题


I have multiple threads, executing similar queries. They shouldn't be executed the same time. I can create and check mutex for this purpose from ADO.Net client, but for some reason I'd prefer to do this using SQL. Is it possible?

Regards,


回答1:


Yes it is. Application Locks (or Mutexes) in SQL Server 2005




回答2:


Use the locking available in SQL Server:

Introduction to Locking in SQL Server



来源:https://stackoverflow.com/questions/4596377/mutex-analog-in-sql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!