Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
hspatil31
Posting Yak Master
182 Posts |
Posted - 2011-08-29 : 11:06:40
|
| Dear All,I am using following delete command for deleting a millions of record from table. I want use TABLOCK in the same command.So can anybody suggest me how to use TABLOCK x in delete command.delete from dbo.abcwhere a ='E0447E67-FD8B-4B68-973E-9E1E0E977491'Thanks and Regard'sHarish Patil |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-29 : 11:08:38
|
not sure why you want to do thisdelete from dbo.abc with (tablock)where a ='E0447E67-FD8B-4B68-973E-9E1E0E977491' ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
hspatil31
Posting Yak Master
182 Posts |
Posted - 2011-08-29 : 12:15:10
|
| Because in my table having crore of record. So i want to delete 15 lakhs record. I thought table locking problem will come. That's y i am using TABLOCK. Thnks, |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-29 : 12:24:16
|
| ok fine.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-08-29 : 12:30:47
|
| You realise that will completely prevent any other access to the table while the delete is running?--Gail ShawSQL Server MVP |
 |
|
|
|
|
|