I'd like to select a record in sql and then update it, all in one statement or stored procedre.
So, I have this statement:
select top 1 ID, TimeStamp, Locked, Deleted
from TableName
where Locked='False' and Deleted='False'
order by TimeStamp asc
How can I select that statement and then set Locked='True' to the returning record.