我在Oracle中创建的过程如下如何在oracle中运行游标输出的程序?
create or replace procedure jobsfetch
(id varchar2,jobcursor out sys_refcursor)
as
begin
open jobcursor for
select * from shop.jobs where job_id = id;
end;
我在SQL运行程序* Plus中使用:
exec jobsfetch('AD_ASST');
但我发现了以下错误
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'JOBSFETCH'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
如何执行这个程序,因为它只有一个输入参数?
尝试此网址https://oracle-base.com/articles/misc/using-ref-cursors-to-return-recordsets –
如果在调用时传递给proc的参数数量。你proc需要2个输入,并在你打电话你只传递1,因此你得到错误 – XING