我的storedProcedure定义如下:
PROCEDURE GetAccessRights(AAccessRights OUT CURSOR_TYPE) AS
BEGIN
OPEN AAccessRights FOR
SELECT AccessRightID, AccessUnitID, AccessObjectID, GrantRights, DenyRights
FROM AccessRights;
END;
然后我尝试从SQL Developer中调用它:
DECLARE
QPZ DDKPROD.DDK.CURSOR_TYPE;
ACCESSRIGHTID AccessRights.ACCESSRIGHTID%TYPE;
ACCESSUNITID AccessRights.ACCESSUNITID%TYPE;
ACCESSOBJECTID AccessRights.ACCESSOBJECTID%TYPE;
GRANTRIGHTS AccessRights.GRANTRIGHTS%TYPE;
DENYRIGHTS AccessRights.DENYRIGHTS%TYPE;
BEGIN
DDK.GETACCESSRIGHTS(qpz);
LOOP
FETCH
QPZ INTO ACCESSRIGHTID, ACCESSUNITID, ACCESSOBJECTID, GRANTRIGHTS, DENYRIGHTS;
EXIT
WHEN QPZ%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(ACCESSRIGHTID || ' ' || ACCESSUNITID);
END LOOP;
CLOSE QPZ;
END;
我的问题是,我得到的唯一输出是以下消息:
匿名块已完成
我的AccessRights中有80行。为什么我没有在循环中列出它们