初学PL/SQL,在PLSQL中,输入以下内容:
declare
cursor c1 is
select staff_id
from tsm_staff
where logonname like '%735CZS%'
order by staff_id;
vname varchar2(40);
begin
open c1;
fetch c1
into vname;
while c1%found loop
dbms_output.put_line(to_char(c1%rowcount)|| ' '|| vname);
end loop;
close c1;
end;
运行结果:
ora-2000:oru-10027:buffer overflow,limit of 10000 bytes
ora-06512:在"sys.dbms_output",line 35
ora-06512:在"sys.dbms_output",line 198
ora-06512:在"sys.dbms_output",line 139
ora-06512:在line 13
在dbms输出中为:
1 170400
1 170400
1 170400
1 170400
1 170400
1 170400
......
请问各位大虾,why?Thank you very much!
declare
cursor c1 is
select staff_id
from tsm_staff
where logonname like '%735CZS%'
order by staff_id;
vname varchar2(40);
begin
open c1;
fetch c1
into vname;
while c1%found loop
dbms_output.put_line(to_char(c1%rowcount)|| ' '|| vname);
end loop;
close c1;
end;
运行结果:
ora-2000:oru-10027:buffer overflow,limit of 10000 bytes
ora-06512:在"sys.dbms_output",line 35
ora-06512:在"sys.dbms_output",line 198
ora-06512:在"sys.dbms_output",line 139
ora-06512:在line 13
在dbms输出中为:
1 170400
1 170400
1 170400
1 170400
1 170400
1 170400
......
请问各位大虾,why?Thank you very much!
while c1%found loop
dbms_output.put_line(to_char(c1%rowcount) ¦ ¦ ' ' ¦ ¦ vname);
fetch c1 into vname;
end loop;