创建包体和调用问题
请问大家,定义创建成功,但包体出现:Warning: PACKAGE BODY created with compilation errors.为何???
还有请问我如何调包并返回查询的结果集?
----------------------------------------------------
CREATE OR REPLACE PACKAGE pkg_BBB
AS
TYPE myrctype IS REF CURSOR;
PROCEDURE get (p_id NUMBER, p_rc OUT myrctype);
END pkg_BBB;
/
CREATE OR REPLACE PACKAGE BODY pkg_BBB
AS
PROCEDURE get (p_id NUMBER, p_rc OUT myrctype)
IS
qlstr VARCHAR2 (500);
BEGIN
sqlstr := 'select ID1,AAA from BBB where id=:w_id ';
OPEN p_rc FOR sqlstr USING p_id;
END pkg_BBB;
------解决方案--------------------Procedure get 也需要end
在 end END pkg_BBB 上面
写end get