oracle调试用的打印输入语句
在调试oracle语句的时候,尤其是存储过程中,为了方便调试经常需要用到dbms_output.put_line()来打印输出,但是使用这个输出却有限制,Dbms_Output.Put_Line字符超过255,如果报错:buffer overflow
解决方案写一个存储过程,分段打印,不过当然要调大buffer size,超过允许的范围也会报错
create or replace procedure put_line_unlimit(p_string in varchar2)
is
l_string long default p_string;
begin
loop
exit when l_string is null;
dbms_output.put_line(substr(l_string,1,200));
l_string := substr(l_string,201);
end loop;
end;
这样就可以通过调用存储过程来输入打印内容
1 楼
Branding
2012-01-06
谢谢,受教啦[color=olive][/color][/size][size=large][/b][b]
引用
我的异常网推荐解决方案:oracle存储过程,http://www.myexceptions.net/oracle-develop/177537.html