What are cursors? Name four types of cursors and when each
one would be applied?
Answer Posted / khushboo rastogi
A cursor is a temporary work area created in the system memory when a SQL statement
is executed. A cursor contains information on a select statement and the rows of data
accessed by it. This temporary work area is used to store the data retrieved from the
database, and manipulate this data. A cursor can hold more than one row, but can process
only one row at a time. The set of rows the cursor holds is called the active set.
There are two types of cursors in PL/SQL:
Implicit cursors:
These are created by default when DML statements like, INSERT, UPDATE, and
DELETE statements are executed. They are also created when a SELECT statement that
returns just one row is executed.
Explicit cursors:
They must be created when you are executing a SELECT statement that returns more
than one row. Even though the cursor stores multiple records, only one record can be
processed at a time, which is called as current row. When you fetch a row the current row
position moves to next row.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is the difference between them (ethernet networks and token ring networks)? : Sql server database administration
Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?
What is sub-query in sql server? Explain its properties.
What is truncate table?
how to take backup bcp out for a column in table in sql server?
What happens if null values are involved in datetime operations?
Explain magic tables in sql server?
what are the reporting service components in SSRS?
What do you know about normalization and de- normalization?
State the difference between local and global temporary tables?
New concepts of sql server 2005 use in your project.
Do you know sql server 2008 backup compression?
explain declarative management framework (dmf) in sql server 2008?
What is BCNF? How is it better than 2NF & 3NF?
Is t sql the same as sql server?