-
Contributing Member
Cursor
I know cursor variable is a pointer of type REF CURSOR.
But what about cursor. Whether a cursor is a pointer or variable?
-
Expert Member
Re: Cursor
A Cursor is always a pointer.
For every sql statement execution certain area in memory is allocated. This are is called private sql area or context area. Cursor acts as a pointer to this context area.
When you declare a cursor, you get a pointer variable, which does not point any thing. When the cursor is opened, memory is allocated and the cursor structure is created. The cursor variable now points the cursor. When the cursor is closed the memory allocated for the cursor is released.
The only difference between cursor and cursor variable is cursor is static in nature. Once a statement is assosiated with it we can't change its contents.
Where as a cursor variable can be assosiated with different queries at runtime depeding upon the requirement.
-
-
Contributing Member
Re: Cursor
cursor is handle for the memory assosiated with a specific statement.
cursor is requried to process rows for inducial queries return multiple rows.
this is 2 types
implicit
explicit
implict means private sql area.
explict we r select mutiple records
-
Expert Member
Re: Cursor
>>implict means private sql area.
Implicit cursors use private sql area or context area to store its information.
>>cursor is requried to process rows for inducial queries return multiple rows.
Can't we use a cursor to process a single row.
Every sql statement is a cursor.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules