create or replace PROCEDURE SPGETROLELIST ( P_APPCODE IN VARCHAR2 , P_USERROLE IN VARCHAR2 , CUR_RESULT OUT SYS_REFCURSOR ) AS P_ApproveFlag ); BEGIN If P_USERROLE = 'M' Then begin P_ApproveFlag := 'R'; end; Else begin P_ApproveFlag := ''; end; End I…
存储过程代码为: create or replace procedure proc_test(pCursor OUT pak_pub.ut_cursor) AS begin -- 使用游标 open pCursor for select * from temp; end ; 其中pak_pub.ut_cursor的定义为: /*创建一个package存放定义的游标*/ create or replace package pak_pub as type ut_cursor is ref curso…
这里使用Oracle数据库的thin连接. 下面是存储过程SQL 1 createorreplaceprocedure proc3(stid in student.stuid%type, stname out student.sname%type, stphone out student.phonenumber%type, stuadd out student.saddress%type) 2 as countnumber number; 3 begin 4 selectcount(*) int…