using dbms_lock.sleep() Sleep in a pl / sql block
I have this simple pl / sql block
set serveroutput on
set timing on
declare
cursor kam is
select upper(state_cd) st from zip_codes_us;
begin
for i in kam loop
dbms_output.put_line(i.st||' STATE');
--dbms_lock.sleep(1);
end loop;
end;
/
I saved this as test.sql and when I run this from sql plus using @test.sql, I get the following output
AK STATE
AL STATE
AR STATE
AR STATE
AZ STATE..... and so on
Now we need to put a pause / sleep after each state is displayed....
for example, display first record, i.e. AK STATE, then pause for 1 minute and then move on to display second record, i.e. "AL STATE" and then pause for 1 minute and so on
0