The flow of execution will be as below:
step1: loop will execute 5 times and the variable value(i) will store in the table a in series of values from 1 to 5.
step2: all 5 values in series from 1..5 will store in table a.
step3: transaction will store in savepoint 1.
step4:rollback to savepoint 1will consist the all value in the table.
step5: next time when program will
execute again loop will store another series of values from 1 to 5 in table a.
So out will be like this:
my program name is a1.sql
SQL> start a1;
PL/SQL procedure successfully completed.
SQL> select * from a;
A
----------
1
2
3
4
5
again
SQL> start a1
PL/SQL procedure successfully completed.
SQL> select * from a;
A
----------
1
2
3
4
5
1
2
3
4
5
10 rows selected.