作者:超级神棍小虾米 | 来源:互联网 | 2023-09-10 20:08
IhaveastoredprocedureinoracleandwanttotestitfromSQLPlus.我在oracle中有一个存储过程,想要从SQLPlus中测试
I have a stored procedure in oracle and want to test it from SQLPlus.
我在oracle中有一个存储过程,想要从SQLPlus中测试它。
If I use
如果我使用
execute my_stored_proc (-1,2,0.01)
I get this error
我收到这个错误
PLS-00306: wrong number or types of arguments in call to my_stored_proc
The beginning for the proc is this
proc的开始就是这个
create or replace PROCEDURE my_stored_proc
( a IN NUMBER,
b IN NUMBER,
c IN NUMBER,
z out NUMBER
) AS ....
Do I need to provide the a var for the out parameter, is so how? I tried:
我是否需要为out参数提供一个var,是这样的?我试过了:
var z NUMBER;
But get this error when I try to run the proc
但是当我尝试运行proc时会出现此错误
execute my_stored_proc (-1,2,0.01,z)
PLS-00201: identifier 'Z' must be declared
Also when I was in SQL-Developer it gave me the usage and it show the inputs in reverse order, that is:
此外,当我在SQL-Developer中它给了我使用它并以相反的顺序显示输入,即:
execute my_stored_proc(z number,c number,b number,a number);
Do you provide them in reverse order or is that just something with SQL-Developer
你是以相反的顺序提供它们还是只是用SQL-Developer提供它们
I did not write the procedure and I don't normally deal with them so I could be missing something obvious.
我没有写程序,我通常不处理它们,所以我可能会遗漏一些明显的东西。
Thanks
2 个解决方案