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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is using With(UpdLock) in an Update stmt redundant?

Status
Not open for further replies.

jsteph

Technical User
Oct 24, 2002
2,562
US
Hi all,
Simple question hopefully.

Is there any functional difference between the two:

Begin Tran
UPDATE Table1 Set foo = 'foo'
WHERE Key = 1;
commit tran
---OR----
Begin Tran
UPDATE Table1 Set foo = 'foo'
FROM Table1 With(UpdLock)
WHERE Key = 1;
commit tran

Thanks,
--Jim
 
Yep, that's redundant.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration)
MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI)
MCM (SQL 2008)
MVP

My Site
 
mredenny,
Thanks, that keeps me sane another day. :)
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top