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

How to execute function in stored procedure sql server?

533


What is a raid and what are different types of raid configurations?

617


What do you understand by recursive stored procedures?

561


New concepts of sql server 2005 use in your project.

1904


Explain trigger and its types?

606






What is indexing explain it with an example?

544


What is the index requirement in SQL Azure?

70


Can a table be created inside a trigger?

555


What do you mean by an execution plan? Why is it used? How would you view it?

525


What is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.

2306


How to execute the cursor queries with "open" statements?

607


Why transaction is important?

557


What is the recursive stored procedure in sql server?

521


Explain difference between cross join and full outer join?

551


what's new in sql server 2016?

552