To suspend the session for a given period of time, use the SLEEP procedure. The parameters for the SLEEP procedure are described in Table 3-11. The syntax for the SLEEP procedure is shown below. DBMS_LOCK.SLEEP(seconds  IN NUMBER);

解决方案 »

  1.   

    抄shuipipi(水皮皮) 的:To suspend the session for a given period of time, use the SLEEP procedure. The parameters for the SLEEP procedure are described in Table 3-11. The syntax for the SLEEP procedure is shown below. DBMS_LOCK.SLEEP(seconds  IN NUMBER);
      

  2.   

    使用過程:
    PROCEDURE SLEEP(tm IN INTEGER)
    IS
    V_ERRORCODE NUMBER;
    V_ERRORMESG VARCHAR2(200);
    end_dt date;
    BEGIN
    end_dt := SYSDATE + tm/(24*60*60);
    WHILE SYSDATE < end_dt LOOP 
    NULL ;
    END LOOP ;
    dbms_output.put_line('i waited '||to_char(tm)||' seconds') ;
    RETURN;
    EXCEPTION
    WHEN OTHERS THEN
    V_ERRORCODE := SQLCODE;
    V_ERRORMESG := SQLERRM;
    DBMS_OUTPUT.PUT_LINE( 'SLEEP Error: '||V_ERRORCODE||' '||V_ERRORMESG);
    RETURN ;
    END SLEEP;
      

  3.   

    DBMS_LOCK.SLEEP(seconds  IN NUMBER);orcale8i 支持么?好像不行呢。
      

  4.   

    to  Ryoko7(然) 
    8i 支持 DBMS_LOCK.SLEEP