创建存储过程报错!
我在toad里编绎这段代码后,报第三行有错误:
CREATE OR REPLACE PROCEDURE obtainpartnumberproc (
leftobid IN VARCHAR2,
rst IN OUT sys_refcursor
)
IS
v_sqlstring VARCHAR2 (1000);
BEGIN
v_sqlstring :=
'SELECT CLASS2,RIGHT,W2ISBORROWED FROM PDMM31A.ASSMSTRC WHERE LEFT='
|| leftobid;
OPEN rst FOR v_sqlstring;
END obtainpartnumberproc;
PLS-00201:必须说明标识符'SYS_REFCURSOR'
请朋友帮我分析一下原因啊,我先谢谢了!!
------解决方案--------------------你的游标没有声明!!!
用包写
------解决方案--------------------先在包头创建:Type SYS_REFCURSOR Is ref Cursor;
再在包体中写存储规程