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

Locking 1

Status
Not open for further replies.

hmckillop

Programmer
Oct 30, 2001
1,540
GB
If I use a rowlock hint, will this lock the associated row for the duration of the transaction
i.e
Begin Tran
SELECT @v_Count = COUNT(*)
FROM Template tpt (ROWLOCK)
WHERE tpt.OID = @pi_TemplateOID

...other sql statements
Commit tran

Thanks
 
Hi !
Begin Tran
SELECT @v_Count = COUNT(*)
FROM Template tpt (ROWLOCK, HOLDLOCK)
WHERE tpt.OID = @pi_TemplateOID

...other sql statements
Commit tran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top