我正在尝试将一些 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;