问题描述
我正在尝试运行具有多个输入和输出参数的存储过程.该过程只能通过导航其他用户 | 在我的连接面板中查看.|套餐 ||
I am trying to run a stored procedure that has multiple in and out paramaters. The procedure can only be viewed in my Connections panel by navigating Other Users | | Packages | |
如果我右键单击 ,菜单项是Order Members By..."和Create Unit Test"(变灰).当用户访问该过程时,似乎无法运行"该过程.
If I right click , the menu items are "Order Members By..." and "Create Unit Test" (greyed out). The ability to "Run" the procedure does not seem possible when it's accessed by user.
我一直在寻找如何创建匿名块的示例,以便我可以将过程作为 SQL 文件运行,但没有找到任何有效的方法.
I have been trying to find an example of how to create an anonymous block so that I can run the procedure as a SQL file, but haven't found anything that works.
有谁知道我如何从 SQL Developer 执行这个过程?我使用的是 2.1.1.64 版.
Does anyone know how I can execute this procedure from SQL Developer? I am using Version 2.1.1.64.
提前致谢!
编辑 1:
我想调用的过程有这个签名:
The procedure I want to call has this signature:
如果我像这样写我的匿名块:
If I write my anonymous block like this:
我收到错误:
我尝试初始化 out* 变量:
I've tried initializing the out* variables:
但得到同样的错误:
编辑 2:
根据亚历克斯的回答,我尝试从参数前面删除冒号并得到这个:
Based on Alex's answer, I tried removing the colons from in front of the params and get this:
推荐答案
使用简单的参数类型(即不是引用等),您可以执行以下操作:
With simple parameter types (i.e. not refcursors etc.) you can do something like this:
<小时>编辑以使用 OP 的规范,以及使用 :var
绑定变量的替代方法:
Edited to use the OP's spec, and with an alternative approach to utilise
:var
bind variables:
这篇关于在 SQL Developer 中运行存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!