What are cursors? Name four types of cursors and when each
one would be applied?
Answer Posted / 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 |
Post New Answer View All Answers
What is merge statement?
How many types of triggers in sql server?
Detail about query optimizer?
Explain filestream storage of sql server 2008?
How to create hyperlink from returned sql query ?
Can a cursor be updated? If yes, how you can protect which columns are updated?
What is 2nf normalization form?
Can foreign key be deleted?
How to trouble shoot if unable to connect SQL Server
What is dirty page?
What is the architecture of ms sql reporting service?
How to handle error or exception in sql?
When should you use an instead of trigger?
Can we perform backup restore operation on tempdb?
What gets stored inside msdb database?