我正在尝试将一些SQL Server代码移植到使用Oracle,并且我不确定某个特定的sql语句。我理解SQL Server锁定的方式对Oracle的锁定没有很好的理解。
WITH message AS (
SELECT TOP(1) * FROM [MyTable]
WITH (UPDLOCK, READPAST, ROWLOCK)
ORDER BY [RowVersion] ASC)
DELETE FROM message
OUTPUT deleted.Id, deleted.CorrelationId, deleted.ReplyToAddress,
deleted.Recoverable, deleted.Expires, deleted.Headers,
deleted.Body;