如何从Oracle存储过程中查看TOAD中的CLOB输出参数? [英] How do I view a CLOB output parameter in TOAD from an Oracle Stored Procedure?

查看:277
本文介绍了如何从Oracle存储过程中查看TOAD中的CLOB输出参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个Oracle数据库的程序包中有一个存储过程,该程序具有2个输入参数+ 1个输出CLOB参数.如何在Toad中查看输出? (最好是仅具有执行/选择权限的用户)

I have a stored procedure in a package in an Oracle database that has 2 input parameters + 1 output CLOB parameter. How do I view the output in Toad? (Preferably with the user only having execute/select permissions)

解决方案:

DECLARE
   my_output_parameter CLOB;
BEGIN 
   my_package.my_stored_proc(1, 2, my_output_parameter);
   DBMS_OUTPUT.PUT_LINE(my_output_parameter);
END;

不要忘记以脚本形式执行,而不仅仅是执行语句,结果将显示在"DBMS输出"窗口中,而不是数据网格中.

Don't forget to execute as script, rather than just execute statement, and results appear in the DBMS Output window, not the datagrid.

推荐答案

我猜DBMS_OUTPUT.PUT_LINE的内部行数限制为255个字符.但是,已从10g第2版开始将其删除.您可以尝试将列数据插入表中,并稍后通过查询该表来查看它.

I guess DBMS_OUTPUT.PUT_LINE has an internal line limit of 255 chars. However it has been removed from 10g Release 2 onwards. You can try inserting the column data in a table and view it later on by querying that table.

请参考-

http://asktom .oracle.com/pls/asktom/f?p = 100:11:0 ::::: P11_QUESTION_ID:146412348066

这篇关于如何从Oracle存储过程中查看TOAD中的CLOB输出参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆