REF CURSOR : A REF Cursor or Cursor Variable is just reference to static cursor or handle to static cursor. It allows user to pass this refrence to same cursor in entire program which needs access to the cursor.
Type of REF Cursor :
Strong Ref Cursor
Weak Ref Cursor
Strong Ref Cursor : In this type of cursor while defining ref cursor you also define what cursor can return.
If Ref cursor return any thing other than Return type it will raise exception 'ROWTYPE MISMATCH'
e.g. TYPE xxemp_ref_cur is REF CURSOR
RETURNING emp%type;
Weak Ref Cursor : Ref cursor called as weak Ref cursor if it does not define what data type it will return.
e.g. TYPE xxemp_ref_cur is REF CURSOR;
Type of REF Cursor :
Strong Ref Cursor
Weak Ref Cursor
Strong Ref Cursor : In this type of cursor while defining ref cursor you also define what cursor can return.
If Ref cursor return any thing other than Return type it will raise exception 'ROWTYPE MISMATCH'
e.g. TYPE xxemp_ref_cur is REF CURSOR
RETURNING emp%type;
Weak Ref Cursor : Ref cursor called as weak Ref cursor if it does not define what data type it will return.
e.g. TYPE xxemp_ref_cur is REF CURSOR;
No comments:
Post a Comment