Thursday, 14 March 2019

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('Current 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...