oracle 存储过程
create or replace procedure mydemo09(var_1 in nvarchar2,var_2 in number,out_1 out nvarchar2)
as
p_name varchar(30);
p_id number(10);
begin
dbms_output.put_line(var_1);
dbms_output.put_line(var_2);
for muser in (select * from buser t where t.delflg=0 ) loop
dbms_output.enable(50000);
p_name := muser.name;
dbms_output.put_line(p_name);
select b.userid into p_id from buser b where b.userid=muser.userid;
dbms_output.put_line(p_id);
end loop;
out_1 := p_name;
commit;
end;
DECLARE
a nvarchar2(10);
begin
mydemo09('sys',1,a);
dbms_output.put_line('name last :'||a);
end;