Saturday, 11 August 2018

Oracle / PLSQL: FOR LOOP IN REVERSE

SET SERVEROUTPUT ON:

Declare
b2 varchar2(100);
Begin
select count(*) into b2 from countries;
for i in reverse 1..b2 loop
dbms_output.put_line('Reverse Value is: '|| i);
end loop;
end;
/

No comments:

Post a Comment

Oracle / PLSQL: FOR LOOP

set serveroutput on; declare a1 varchar2(100); begin select count(*) into a1 from employees; for i in 1..a1 loop dbms_output.put_line...