How to see refcursor result/output in Oracle SQL Developer?(如何在 Oracle SQL Developer 中查看 refcursor 结果/输出?)
问题描述
可能的重复:
获得结果的最佳方式/工具来自 oracle 程序包
Oracle SQL Developer:在网格中显示 REFCURSOR 结果? >
我是 Oracle SQL Developer 的新手.我使用的是 Oracle SQL Developer 3.0 版.我试图使用以下查询来测试我的 SP.
I am new to Oracle SQL Developer. I am using Oracle SQL Developer Version 3.0. I was trying to test my SP using the following query.
DECLARE
type output_cursor is ref cursor;
P_CURSOR output_cursor;
BEGIN
P_CURSOR := NULL;
myPackage.mySPTest ( P_NOTIFICATION_ID => 1975357,P_CURSOR => P_CURSOR) ;
END;
当我在 Oracle SQL Developer 中运行上述查询时,我收到一条消息匿名块已完成",但没有显示任何结果.
When I ran the above query in my Oracle SQL Developer, I am getting a message 'anonymus block completed' and its not showing any result.
谁能帮我看看结果如何.
Can anyone help me, how to see the result.
.
推荐答案
可以使用 SQL Developer 中声明的绑定变量来保存和显示结果:
You can use a bind variable declared in SQL Developer to hold and show the results:
var r refcursor;
exec myPackage.mySPTest(P_NOTIFICATION_ID => 1975357, P_CURSOR => :r);
print r;
exec 是匿名块的简写,所以这相当于:
exec is shorthand for an anonymous block so this is equivalent to:
var r refcursor;
begin
myPackage.mySPTest(P_NOTIFICATION_ID => 1975357, P_CURSOR => :r);
end;
/
print r;
除非 P_CURSOR 被声明为无用的东西,否则可能...
Unless P_CURSOR is declared as something unhelpful, maybe...
这篇关于如何在 Oracle SQL Developer 中查看 refcursor 结果/输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Oracle SQL Developer 中查看 refcursor 结果/输出?
基础教程推荐
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 在 SQL 中连接多个表 2021-01-01
- 无法解决整理冲突 2021-01-01
