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 difference between createstatement and preparedstatement?
What do I need to start working with sql studio? : sql server management studio
What are indexers?
What are the types of indexes?
How to change the system date and time from SQL Plus Terminal ?
How will you make an attribute not process? : sql server analysis services, ssas
Why I am getting "the microsoft .net framework 2.0 in not installed" message?
What is a raid and what are different types of raid configurations?
How to select true false based on column value in sql server?
What is the maximum size of sql server database?
How to find which stored procedure is currently running in sql server?
You have a stored procedure, which execute a lengthy batch job. This stored procedure is called from a trigger you do not want to slow the data entry process you do not want trigger to wait for this batch job to finish before it completes itself what you can do to speed up the process?
Difference between Inner vs outer joins?
How do I get Report Builder to generate a parameter that can be set by users viewing the report?
How to create a view with data from multiple tables?