What are cursors? Name four types of cursors and when each
one would be applied?
Answers were Sorted based on User's Feedback
Answer / sreyasmn
Cursors can be either updateable or non-updateable. If you
only need to display information and not diddle with it,
the non-updateable is the fastest. The provider simply
passes you the data and forgets about it! There is no need
to keep tabs on the data to see if it has been changed.
Therefore, this is the fastest cursor to use.
Cursor type
Static cursor. This is the one to use for generating
reports or finding data. Additions, changes, or deletions
by other users are not visible
Forward-only cursor. This is the default. It is identical
to the Static except that you can only scroll forward. The
fastest cursor this side of the Pecos Mountains.
Dynamic cursor. Additions and deletions by others are
visible. All movement is supported. But some providers
don't support this cursor type.
Keyset-driven cursor. This is similar to a Dynamic cursor
except you can't see records others add. If another user
deletes a record, it is inaccessible from your recordset
| Is This Answer Correct ? | 46 Yes | 13 No |
Answer / basha
Following are different types of cursors available in SQL Server 2005 :
Base table
Static
Dynamic
Forward-only/Read-only
Keyset-driven
Base table: Base table cursors are the lowest level of cursor available. Base table cursors can scroll forward or backward with minimal cost, and can be updated
Static: Cursor can move to any record but the changes on the data can’t be seen.
Dynamic: Most resource extensive. Cursor can move anywhere and all the changes on the data can be viewed.
Forward-only: Cursor moves one step forward, can’t move backwards.
Keyset-driven: Only updated data can be viewed, deleted and inserted data cannot be viewed.
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / 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 |
What is the use of custom fields in report?
What is normalization of database? What are its benefits?
What triggers long term care?
A successfully created SSIS package in SQL Server 2005 runs fine in MS BIDS and Integration Services. But gives error when run through an SQL-Job. What are the possible reasons?
explain how to create a new schema in a database? : Sql server database administration
What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?
11 Answers World Tech, Yardi Software,
What are the types of stored procedures in an sql server?
Write an sql query for deleting duplicate rows?
Can group by be used without aggregate functions?
New concepts of sql server 2005 use in your project.
please bar with my english i having a database called tblhallreservation in which res_date is date field has to select all the fields in table deponding on month either has to display all details for the month jan or feb and so on
Please explain go command in sql server?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)