One of the alternative i could think of is use of the method sleep
from the Java
class Thread
, which you can easily use through providing a simple PL/SQL
wrapper procedure as shown below:
Procedure:
CREATE OR REPLACE PROCEDURE sleep (
p_milli_seconds IN NUMBER
) AS LANGUAGE JAVA NAME 'java.lang.Thread.sleep(long)';
Execution
BEGIN
DBMS_OUTPUT.PUT_LINE('Start ' || to_char(SYSDATE, 'YYYY-MM-DD HH24:MI:SS'));
SLEEP(5 * 1000); -- Resting for 5 sec
DBMS_OUTPUT.PUT_LINE('End ' || to_char(SYSDATE, 'YYYY-MM-DD HH24:MI:SS'));
END;
/
Output:
Start 2020-03-25 12:57:24
End 2020-03-25 12:57:36