What are cursor?where are they used?
Answers were Sorted based on User's Feedback
Answer / sohini
Whenever you issue a SQL statement, the Oracle server opens
a SQL work area in memory in which the command is parsed
and executed. This area is called a cursor.There are two
type of cursors:
Implicit Cursor:PL/SQL declares a cursor implicitly for all
SQL data manipulation statements, including queries that
return only one row.PL/SQL manages this cursorautomatically.
Explicit Cursor:The programmer explicitly declares and
names an explicit cursor for queries that return more than
one row.it is managed by the programmer.
Explicit cursors are used when one wants to do some
processing with a set of rows fetched from a table or
multiple table.They are managed using OPEN,FETCH and CLOSE.
4 attributes are used in both types of cursors:%FOUND,%
NOTFOUND,%ROWCOUNT and %ISOPEN.
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / manvendra
USER DEFINED sql WORK AREA FOR QUERY IS CURSOR.
USED TO STORE RESULT SET PROVIDED BY THE QUERY FOR SHORT
AND TEMP BASIS.
MAIN STATES ARE
CLOSE
OPEN
FETCH
| Is This Answer Correct ? | 0 Yes | 1 No |
How are extents allocated to a segment?
Why does oracle 9i treat an empty string as null?
Why is oracle so popular?
what is the difference between UNION AND UNIONALL
What are the oracle built-in data types?
Which Oracle App Is Most Popular One ?
What is the effect of setting the 'RULE' for OPTIMIER_GOAL parameter of the ALTER SESSION Command ?
What are the database administrators utilities available?
How can we find out the current date and time in oracle?
What is a deadlock ? Explain .
What is sequence?
how to get required data from oracle source is like this ram_05_seetha lax_05_viswa bamr05frummy run_01_away sw_sas_trim i want my target data like ram_05_seetha lax_05_viswa to get data using %_05_% but it will give ram_05_seetha lax_05_viswa bamr05frummy how can i get my target data?