ksh_raj
SSC Journeyman
Points: 89
More actions
April 2, 2002 at 9:09 pm
#157696
How to lock a table in sqlserver?
Andy Warren
SSC Guru
Points: 119902
April 3, 2002 at 4:52 am
#426522
Use a locking hint like TABLOCKX. Why do you need to lock the entire table?
Andy
AndySQLAndy - My Blog!Connect with me on LinkedInFollow me on Twitter
Antares686
Points: 125444
April 3, 2002 at 4:51 pm
#426571
Basics is as Andy says, here however is an example.
SELECT * FROM tblX WITH (HOLDLOCK TABLOCKX)
But I too question why.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply