Tuesday 7 July 2015

REF Cursor in Plsql

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;




No comments:

Post a Comment

How to resolve issue for BIP RTF template XML tags showing value as <?ref: 0000xx?>

 How to resolve issue for BIP RTF template XML tags showing value as <?ref: 0000xx?>  Sometime these xml data tags automatically chang...