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);
解决方案 »
- 压缩的表入库速度会变慢么?
- 求查询个数的一条SQL
- 关于oracle的 enterprise manager console 的登陆问题!
- 请问PL/SQL中的标签<>起什么作用??
- 在pl/sql developer中调用存储过程的sql句是怎么写的?
- 请问为什么要给表加索引?
- oracle9.2.0在p4机器上安装问题?
- 请帮解释一下:ORA-01599: failed to acquire rollback segment (37), cache space is full (currently has (36) entries)
- .Net下用哪种连接比较好,是oledb还是oracleclient?
- 真无用武之地?:)
- 用第三方工具调试存储过程出现错误:ORA-00604,ORA-01400是什么原因?
- 查询大小写的问题!!!
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;
8i 支持 DBMS_LOCK.SLEEP