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

时间:2017-09-01 14:58:40   收藏:0   阅读:660
 
  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  

原文:http://www.cnblogs.com/pejsidney/p/7463171.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!