По моему опыту, вы не можете безопасно использовать значения в столбцах как способ "заблокировать" вещи.Если вам нужно сгенерировать блокировку, я предлагаю вам использовать подпрограммы в пакете DBMS_LOCK, например:
DECLARE
strLock_handle VARCHAR2(128);
iResult INTEGER;
excpAllocate EXCEPTION;
PRAGMA EXCEPTION_INIT(excpAllocate, -20000);
BEGIN
DBMS_LOCK.ALLOCATE_UNIQUE(lockname => 'YOUR LOCK NAME',
lockhandle => strLock_handle);
iResult := DBMS_LOCK.REQUEST(lockhandle => strLock_handle,
lockmode => DBMS_LOCK.X_MODE, -- exclusive mode
timeout => DBMS_LOCK.MAXWAIT,
release_on_commit => FALSE);
IF iResult = 0 THEN
-- Do what you need to do exclusively here - nothing else will be able to enter this
-- section as they'll stall on the DBMS_LOCK.REQUEST call above.
DBMS_OUTPUT.PUT_LINE('This is a stupid piece of example code');
-- Note: if we changed the RELEASE_ON_COMMIT parameter passed to DBMS_LOCK.REQUEST
-- above to TRUE, the following COMMIT would release all locks held
-- by this process for which RELEASE_ON_COMMIT was TRUE.
COMMIT;
-- Release the lock acquired above. This will allow one of the (possibly
-- many) processes stalled on the DBMS_LOCK.REQUEST above to proceed.
iResult := DBMS_LOCK.RELEASE(strLock_handle);
ELSE
-- Lock was not acquired. Reasons are:
-- iResult Reason
-- 1 Timeout
-- 2 Deadlock
-- 3 Parameter error
-- 4 Already own lock specified
-- 5 Illegal lock handle
DBMS_OUTPUT.PUT_LINE('DBMS_LOCK.REQUEST failed - iResult = ' || iResult);
END IF;
EXCEPTION
WHEN excpAllocate THEN
DBMS_OUTPUT.PUT_LINE('DBMS_LOCK.ALLOCATE failed : ' || SQLCODE || ' ' || SQLERRM);
END;
Удачи.