What are the disadvantages of cursors? How can you avoid
cursors?

Answer Posted / rahul kumar

A) In cursors each time you fetch a new row it does a round
trip with the database thereby increase network use and time.

B) There is also restriction on select statements that can be
used in cursors

C) It also uses more resources and temporary memory

Cursors can be avoided with the help of careful
implementation of while loop and other set based operations

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

You have a table with three columns: amount1, amount2, and amount3 in a single row only one of these three columns will have a value and the other two will be null. Write a sql query to retrieve the values from these columns?

544


Explain the role of indexing in databases?

640


Explain the process of the user request and data generating?

647


What are the three types of database design?

539


In which table collections errors are stored.

1935






You have two tables with a one to many join based on a field named id. You need to find records in the parent table that are not represented in the child table. how would you accomplish this?

585


There is a trigger defined for INSERT operations on a table, in an OLTP system. The trigger is written to instantiate a COM object and pass the newly insterted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better?

1986


Explain about the hierarchical model of the database?

576


Which four data types cannot be used as a return type from a user-defined function?

577


Explain about relational operator join?

609


How you can make a parameterized view?

554


Any sample or model question of punjab national bank for deputy manger IT or any sample of PNB.any1 plz do send on

1815


Hi my program is accesing data from two db2 databases.what is the bind card for this program to genarate plan? how to specify the two owners and two qualifiers in bind card

1672


What are the types of database model?

539


Write the fastest query to find out how many rows exist in a table?

658