Re: How to delay a sql statement in PL/SQL block

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 1996/11/07
Message-ID: <32824680.21401013_at_dcsun4>#1/1


On 7 Nov 1996 17:20:46 GMT, lesliet_at_u.washington.edu (L. Tseng) wrote:

>I'd like to do the following:
>
> LOOP
>
> delay 5 seconds;
>
> select...;
> delete ...;
> update...;
> END LOOP;
>
>Does anyone know how to implement this? I noticed 'DELAY'
>is a reserved word in PL/SQL but could not find any info
>about it. Is this the right one to use and how?
>Thanks,
>
>Leslie

dbms_lock.sleep(5) will do this for you

Thomas Kyte
Oracle Government
tkyte_at_us.oracle.com                          

http://govt.us.oracle.com

  • Check out Oracle Governments web site! ----- Follow the link to "Tech Center" and then downloadable Utilities for some free software...

statements and opinions are mine and do not necessarily reflect the opinions of Oracle Corporation Received on Thu Nov 07 1996 - 00:00:00 CET

Original text of this message