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

if we give update table_name set column_name= default. what will happen? its given in pl sql block.what will hapen?

5 Answers   iFlex,


What is write ahead logging in sql server?

0 Answers  


What is the purpose of normalization?

0 Answers  


How to move files from one directory to another in pl sql?

0 Answers  


Explain the difference between drop and truncate commands in sql?

0 Answers  






what is a trigger? : Sql dba

0 Answers  


Does sql require a server?

0 Answers  


What do you mean by query optimization?

0 Answers  


what are the demerits of sql?

1 Answers  


what is a sub query?how will you calculate working days in a month using sub query?

4 Answers   InteQ,


What is the maximum number of triggers,can apply to a single table?

2 Answers  


What is a unique key and primary key and foreign key?

0 Answers  


Categories