CREATE OR REPLACE PROCEDURE wq_test(id in number, v_res out sys_refcursor) is
begin
if id = 1 then open v_res for
SELECT id FROM DUAL;
else open v_res for
SELECT id,id + 1 FROM DUAL;
end if;
end;
CREATE OR REPLACE PROCEDURE wq_test(id in number, v_res out sys_refcursor) is
begin
if id = 1 then open v_res for
SELECT id FROM DUAL;
else open v_res for
SELECT id,id + 1 FROM DUAL;
end if;
end;
本文标题:Oracle 写一个存储过程根据入参返回不同的结果集
本文链接:https://www.haomeiwen.com/subject/qwareqtx.html
网友评论