mis_data.dept_status的表数据
id
1
2
3
4
创建如下存储过程:
create or replace procedure test
as
a varchar(20);
begin
for new in(select * from mis_data.dept_status)
loop
a:=new.belong_region;
a:=a||',';
end loop;
dbms_output.put_line(a);
end;
这样的话结果是4,
那我要的结果是1,2,3,4
要怎么做?