Oracle 存储过程 延迟执行 DBMS_LOCK.SLEEP(60);

 
  1. --测试代码:  
  2.   
  3. declare   
  4.   -- Local variables here  
  5.   i integer;  
  6. begin  
  7.   -- Test statements here  
  8.    dbms_output.put_line(to_char(sysdate,'yyyy-MM-dd HH24:MI:SS'));  
  9.    DBMS_LOCK.SLEEP(60);--休眠60秒  
  10.    dbms_output.put_line(to_char(sysdate,'yyyy-MM-dd HH24:MI:SS'));  
  11. end;  
  12.   
  13.   
  14. --输出结果:  
  15.   
  16. 2012-08-27 16:25:49  
  17. 2012-08-27 16:26:49  
原文地址:https://www.cnblogs.com/pejsidney/p/7463171.html