1
我已经创建了一个RefCursor类型的包。如果使用条件块中的Refcursor in Pl/SQl
我在我的存储过程中使用包。
代码如下所示:
CREATE OR REPLACE PACKAGE PRODDB.types
AS
type cursorType is ref cursor;
END;
CREATE OR REPLACE PROCEDURE PRODDB.P_Get_AdminPLCReport
(
Final_Output out TYPES.cursorType
)
AS
BEGIN
IF(Criteria='1') THEN
OPEN Final_Output FOR
SELECT Personal_Information.F_Salutation
FROM Allotment_Information;
END IF;
END P_Get_AdminPLCReport;
我想用两个如果在这个存储过程的条件。
我是Pl-Sql的新手。
任何人都可以通过告诉我这个语法来帮助我。
感谢名单
-
更新
感谢名单贾斯汀(response here),
但我想用两个条件,如:
IF(标准=' 1')然后
//一些查询;结束如果
如果(条件='2')然后
// some query;
end if
我会传递param标准的值。
基于标准的价值,我想执行不同的查询。