What are ref cursors ?

Questions by Shweta_faqs   answers by Shweta_faqs

Showing Answers 1 - 6 of 6 Answers

guru

  • Feb 13th, 2006
 

They are similar to a normal curson but they can have different select stmts at run time.

  Was this answer useful?  Yes

rnr

  • Feb 16th, 2006
 

cursors r private sql area used to access its stored information

  Was this answer useful?  Yes

manu

  • Apr 6th, 2006
 

  cursor is a  memeory area where  Oracle process SQL statment , whele ref cursor is a pointer to point  cursor area( memory location), So ref cursor holds location of cursor.

  Was this answer useful?  Yes

nisha

  • Aug 24th, 2006
 

ref cursor is a simple cursor but it is a datatype that allow developers to declare cursor variable

ref cursor has 2 types:-

strong ref cursor where we mention the return type with rowtype.

weak cursor where we don't mention return type.the advantage of this is that we can use weak cursor with any query.it is not rowtype bounded.

for ex:-strong ref cursor

type curvar_type is ref cursor return emp%rowtype;

weak cursor:-

type curvar_type is ref cursor is

g_sidhu

  • Jan 31st, 2008
 

Cursor variables are like C or Pascal pointers, which hold the memory location (address) of some item instead of the item itself. Thus, declaring a cursor variable creates a pointer, not an item. In PL/SQL, a pointer has the datatype REF X, where REF is short for REFERENCE and X stands for a class of objects. A cursor variable has datatype REF CURSOR.

Like a cursor, a cursor variable points to the current row in the result set of a multirow query. However, cursors differ from cursor variables the way constants differ from variables. A cursor is static, but a cursor variable is dynamic because it is not tied to a specific query. You can open a cursor variable for any type-compatible query. This gives you more flexibility.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions