I have a CURSOR then why we need BULK COLLECT again?



I have a CURSOR then why we need BULK COLLECT again?..

Answer / priya

"PL/SQL sends SQL statements such as DML and queries to the
SQL engine for execution, and SQL returns the results to
PL/SQL. You can minimize the performance overhead of this
communication between PL/SQL and SQL by using the PL/SQL
features that are known collectively as bulk SQL.

The FORALL statement sends INSERT, UPDATE, or DELETE
statements in batches, rather than one at a time. The BULK
COLLECT clause brings back batches of results from SQL. If
the DML statement affects four or more database rows, bulk
SQL can improve performance considerably.

Bulk SQL uses PL/SQL collections to pass large amounts of
data back and forth in single operations. This process is
called bulk binding. If the collection has n elements, bulk
binding uses a single operation to perform the equivalent of
n SELECT INTO, INSERT, UPDATE, or DELETE statements. A query
that uses bulk binding can return any number of rows,
without requiring a FETCH statement for each one."

Is This Answer Correct ?    9 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

How to use transactions efficiently : transact sql

0 Answers  


What is a schema in sql?

1 Answers  


Which table is left in left join?

0 Answers  


Are stored procedures compiled?

0 Answers  


Temporary table vs Table variable in sql server?

0 Answers   Wipro,






Does truncate release storage space?

0 Answers  


How to get the 3rd column(i.e all the data along with the column name)in a table?

2 Answers   Logica CMG,


what are the advantages and disadvantages of views in a database? : Sql dba

0 Answers  


What are stored procedures used for?

0 Answers  


What are the differences between implicit and explicit cursors?

0 Answers  


What is break?

0 Answers  


How do you update f as m and m as f from the below table testtable?

0 Answers  


Categories