1. 程式人生 > >Oracle 存儲過程 延遲執行 DBMS_LOCK.SLEEP(60);

Oracle 存儲過程 延遲執行 DBMS_LOCK.SLEEP(60);

nbsp to_char ng- pos variables div char str 延遲

  1. --測試代碼:
  2. declare
  3. -- Local variables here
  4. i integer;
  5. begin
  6. -- Test statements here
  7. dbms_output.put_line(to_char(sysdate,‘yyyy-MM-dd HH24:MI:SS‘));
  8. DBMS_LOCK.SLEEP(60);--休眠60秒
  9. dbms_output.put_line(to_char(sysdate,‘yyyy-MM-dd HH24:MI:SS‘));
  10. end;
  11. --輸出結果:
  12. 2012-08-27 16:25:49
  13. 2012-08-27 16:26:49

Oracle 存儲過程 延遲執行 DBMS_LOCK.SLEEP(60);