July 27, 2011 at 10:13 am
Hi all,
We have a select for update query in Oracle, to xlock the rows in the select statement before the update statement..
select * from slm where area_code='SI' for update of city
Is there an equivalent query in SQL Server to xlock the rows to be updated without running it in a transaction??
Thanks a lot
August 19, 2011 at 7:44 am
newbieuser (7/27/2011)
Hi all,We have a select for update query in Oracle, to xlock the rows in the select statement before the update statement..
select * from slm where area_code='SI' for update of city
Is there an equivalent query in SQL Server to xlock the rows to be updated without running it in a transaction??
Thanks a lot
How about something like...
select *
from slm WITH (XLOCK,READPAST)
where area_code='SI'
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply