1

On an Oracle DB, if I have a table with an arbitrary number of rows. What is the simplest way of running an update query that will update the first 15 rows, then wait 2 seconds, then update the next 15 rows, then wait 2 seconds, then update the next 15 rows... and so on?

Stephen Walsh
  • 815
  • 4
  • 18
  • 34

1 Answers1

5

Write A PLSQL block and use dbms_lock.sleep.

Example:

Declare
abc varchar(50);
.
.
.
begin
for i ...... loop
.
.
dbms_lock.sleep(2);
end loop;
end;
/
Shariar Imtiaz
  • 483
  • 1
  • 5
  • 15