Mycodefunda.blogspot.com contains coding tricks,tips and examples of solutions worked on
technologies like C# ,Asp.net ,.net, Vb.net ,XML ,Scripts ,Css ,Jquery ,Html ,Javascript , Wcf ,Wpf ,Ms Sql etc.
Thursday, 27 October 2016
How to lock a table in MSSQL
Query lock a table in MSSQL:
BEGIN TRAN
SELECT 1 FROM <Table Name> WITH (TABLOCKX)
WAITFOR DELAY '00:11:00'
ROLLBACK TRAN
GO
No comments:
Post a Comment