advanced code snippet search
geekzspot on 10/19/12
Oracle PLSQL
10/19/12 06:33am10/19/12 06:16am
Calculate and display the elapsed time for PL/SQL code
SET SERVEROUTPUT ON DECLARE start_time INTEGER; stop_time INTEGER;BEGIN start_time := DBMS_UTILITY.GET_TIME; DBMS_LOCK.SLEEP(42); stop_time := DBMS_UTILITY.GET_TIME; DBMS_OUTPUT.PUT_LINE(TO_CHAR((stop_time - start_time)/100) || ' seconds');END;/ 42 seconds
Report this snippet Tweet
Comment:
You need to login to post a comment.