How many types of Cursor in SQL SERVER?

Answer Posted / anindya basu

There are four types of cursor in SQL Server which are:

a. Static
b. Dynamic
c. Forward Only, and
d. Keyset
Static keysets aren't sensitive to database changes and are scrollable.
Dynamic keysets are sensitive to database changes and are scrollable.
Forward only keysets aren't sensitive to database changes and allows only forward scrolling of data. There are 3 variants of Forward Only cursors viz. Forward Only Static, Forward Only Keyset, and Fast Forward. Fast Forward is the fastest of all cursors.
Keyset cursor supports movement from the first row to the last and vice-versa. It doesn't identify inserts but recognizes both updates and deletes.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is the primary key column of a table an index in ms sql server?

532


Data is not being delivered to subscribers, what can be the possible reasons? : sql server replication

537


What is "scheduled jobs" or "scheduled tasks"?

552


How is foreign key related to primary key?

568


What is ddl and dml commands?

506






Does order by actually change the order of the data in the tables or does it just change the output?

651


What is merge statement?

621


Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.

2025


Explain magic tables in sql server?

545


How to Insert multiple rows with a single insert statement?

543


What are parameterized reports? What are cascading parameters in ssrs reports?

100


Explain comment on transactions?

551


Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

522


What is the usage of the sign function?

523


your distribution database is full what will u do

1676