Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update with Nolock

Status
Not open for further replies.

sendba

Programmer
Sep 7, 2005
113
US
hai all

I have an update problem .Please help me
Let me know whether i can use nolock in the update statement as given below


update a
set a.nproductid = b.Productid
from db1..tb1 a with (nolock)
inner join db2..tb2 b with (nolock)
on a.col1 = b.col1


thanks in advance

Sen
 
You can try, but I don't think it'll work. AFAIK, Update requires the ability to lock something (record or table) depending on what kind of update you're doing.

You might be able to use With (Nolock) on the table you are not updating (Table B), but I wouldn't recommend using it on Table A.



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top