Types of cursor variable.

0
Types of cursor variable:
There are two types of Ref Cursor.
  • Weak cursor variable or Weak Ref Cursor
  • If we do not include a RETURN clause in the Cursor, then it is a weak REF Cursor.
  • Cursor variables declared from weak REF cursors can be associated with any query at runtime.
Syntax:
    Step-1:
    Type <type name> is ref cursor;
    Step-2:
    <cursor variable name> <type name>;
    Step-3:
    Open<cursor variable name>
    for(select statement);
    fetch
    exit
    close;

Strong cursor variable:
  • A REF CURSOR with a RETUN clause define a “Strong” REF CURSOR.
Syntax:
    Step-1:
    Type <type name> is ref cursor
    RETURN record_type;
    Step-2:
    <cursor variable name> <type name>;
    Step-3:
    Open<cursor variable name>
    for(select statement);
    fetch
    exit
    close;



 Click here to go to Back page

About the author

Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus. Aenean fermentum, eget tincidunt.

0 comments:

Recent Posts