In SQL Server I used the following hints inside queries:
e.g.
select top 1 data from tablez with (rowlock,updlock,readpast);
Are there equivalent in-query hints for Oracle?
The equivalent of ROWLOCK
is the FOR UPDATE
clause
select *
from emp
for update;
Since 11g Oracle has documented the SKIP LOCKED
syntax which is the equivalent of READPAST
:
select *
from emp
for update skip locked;
This syntax has worked for ages (it is fundamental to Advanced Queuing) but if it's not in the docs it's not supported,
There is no equivalent of UPDLOCK
lock because Oracle flat out doesn't allow dirty reads. Find out more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With