SQL>
SQL> create table t ( msg varchar2(25), c1 int, c2 int );
Table created.
SQL>
SQL> insert into t values ( 'c1=1, c2=2', 1, 2 );
1 row created.
SQL>
SQL> create or replace procedure P
2 authid current_user
3 as
4 begin
5 for x in ( select * from t ) loop
6 dbms_output.put_line( 'msg= ' || x.msg );
7 dbms_output.put_line( 'C1 = ' || x.c1 );
8 dbms_output.put_line( 'C2 = ' || x.c2 );
9 end loop;
10 end;
11 /
Procedure created.
SQL>
SQL> exec p
msg= c1=1, c2=2
C1 = 1
C2 = 2
PL/SQL procedure successfully completed.
SQL>
|