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
How to list all stored procedures in the current database using ms sql server?
How to transfer data from a cursor to variables with a "fetch" statement?
How do you delete duplicate records in sql server?
What are temporal tables in sql server 2016?
What is a fill factor?
How to find Duplicate Records In table?
Explain tables in SQL Azure?
You have a table ‘test’ which is a copy of northwind employee table you have written a trigger to update the field ‘hiredate’ with the current date
What is the security model used in sql server 2005?
What is the architecture of ms sql reporting service?
What is a table called, if it has neither cluster nor non-cluster index? What is it used for?
What is system stored procedures?
What is the difference between varchar and nvarchar?
What are sql server procedures?
What is the full meaning of dml?