February 4, 2010 at 10:16 pm
How i can lock the table while insert the details in the table.
February 4, 2010 at 10:30 pm
insert into table with(rowlock) values()
February 5, 2010 at 6:37 am
if this is bcp or bulk insert check out the tablock hint.
---------------------------------------------------------------------
February 5, 2010 at 9:59 am
You can use both HINTS:
-- ROWLOCK: When you wish row-level locks.
-- TABLOCK: When you wish a table lock.
February 5, 2010 at 9:02 pm
If you use WITH(TABLOCKX), no one but you will get in once everyone else gets out. The "X" stands for "exclusive".
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply