what is cursor?why we will go to cursor?advantages &disadvantages of cursors?

Answer Posted / ramya gurrala

Cursor is a pointer(in c/java).Cursor work with DML and information can be accessed.

Cursor is required to process each row individually for queries which return multiple rows.

Advantages:1)We can do operations on each row.
2)Response time is good.
3)Cursors are faster than the while loop.

Disadvantages:1)Repeated network round trips.
2)Occupies more resources and temporary storage.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is user-defined inline table-valued function?

511


What is the difference between varchar and varchar types?

557


do you know what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration

473


What are secondary xml indexes?

560


Tell me about pre-defined functions of sql?

687






How do I determine how many instances of sql server are installed on a computer?

527


Define a cross join?

587


How to create a login account in ms sql server to access the database engine using "create login" statements?

563


When is update_statistics command used?

572


Does index speed up select statements?

579


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?

566


What are out-of-range errors with date and time literals?

543


Can you please differentiate between a primary key and a unique key?

526


What is the difference between rank and dense_rank?

499


How many types of dimensions are there and what are they? : sql server analysis services, ssas

559