What are cursors? Name four types of cursors and when each
one would be applied?

Answer Posted / basha

Following are different types of cursors available in SQL Server 2005 :

Base table
Static
Dynamic
Forward-only/Read-only
Keyset-driven

Base table: Base table cursors are the lowest level of cursor available. Base table cursors can scroll forward or backward with minimal cost, and can be updated

Static: Cursor can move to any record but the changes on the data can’t be seen.

Dynamic: Most resource extensive. Cursor can move anywhere and all the changes on the data can be viewed.

Forward-only: Cursor moves one step forward, can’t move backwards.

Keyset-driven: Only updated data can be viewed, deleted and inserted data cannot be viewed.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of passing name-value pairs as parameters?

667


What is a domain constraint give an example?

575


How will you go about resolving deadlocks?

565


What is precedence constraint?

550


What is Transparent Data Encryption?

594






Explain different types of lock modes in sql server 2000?

533


What are xml indexes?

535


Explain datetime2 data type in sal server 2008?

549


What is the difference between functions and scalar functions?

574


How to defragment table indexes?

558


What is the difference function and stored procedure?

565


What are clustered and non-clustered index?

556


Explain what are various ways to enhance the ssrs report?

581


Why the trigger fires multiple times in single login?

734


Explain the phases a transaction has to undergo?

560