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


Please Help Members By Posting Answers For Below Questions

How can I change procedure name in sql server?

619


Can you get second highest salary from the table?

629


Write an sql query to sort a table according to the amounts in a row and find the second largest amount.

635


What are SSL and TSL protocols?

667


What is difference between getdate and sysdatetime in sql server 2008?

684






Are resultset updatable?

597


your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files? : Sql server administration

654


What does man by sql wildcard characters in sql server?

619


What are sql server procedures?

637


How many tables can be joined in SQL Server?

667


How to install sql server 2005 express edition?

676


What is the preferred way to create a clustered and non-clustered index? Which index should you create first the clustered or non-clustered?

554


What is the difference between composite index and covering index?

600


What Is Rdbms?

746


I have all the primary data files, secondary data files as well as logs. Now, tell me can I still restore the database without having a full backup? : sql server database administration

775