ORACLE PL / SQL: Testing SELECT FOR UPDATE in Oracle SQL Developer

We are currently trying to implement SELECT FOR UPDATE to block rows. If I run:

SELECT * FROM data where rowid = 'AAAQA5AAGAACNbEAA1' FOR UPDATE;
SELECT * FROM data where rowid = 'AAAQA5AAGAACNbEAA1' FOR UPDATE NOWAIT;

I got nothing in ORACLE SQL Developer. Shouldn't this be wrong for me? Is this related to using the same user ID?

+3
source share
2 answers

What do you mean by "I get nothing"? You mean that no query returns a string? If so, that means there are no rows in the table that have this ROWID. Do you mean that the first (or second) operator never returns? If so, the session is blocked waiting to receive a lock.

. , , . , , , .

+5

, .

SELECT (.. )

+1

Source: https://habr.com/ru/post/1785060/


All Articles