匿名过程能不能有输入值
匿名过程能不能有输入值;像下面的语句,能不能把rcClass输出来
declare
type rc_class is ref cursor;
rcClass rc_class;
begin
if 1<>1 then
Open rcClass for SELECT * FROM SYS_NextKey where TableName = '1';
else
Open rcClass for SELECT * FROM SYS_NextKey;
end if;
end;
------解决方案--------------------
SQL code
VAR rcClass REFCURSOR;
BEGIN
IF 1 <> 1 THEN
OPEN :rcClass FOR
SELECT * FROM SYS_NextKey WHERE TableName = '1';
ELSE
OPEN :rcClass FOR
SELECT * FROM SYS_NextKey;
END IF;
END;
/
print rcClass;