What is diff between bulk collect and forall

Answer Posted / prabhudatta barick

#"The keywords BULK COLLECT tell the SQL engine to bulk-bind output collections before returning them to the PL/SQL engine.
#You can use these keywords in the SELECT INTO, FETCH INTO, and RETURNING INTO clauses. Here is the syntax:

... BULK COLLECT INTO collection_name[, collection_name] ..."

#"The keyword FORALL instructs the PL/SQL engine to bulk-bind input collections before sending them to the SQL engine.
Although the FORALL statement contains an iteration scheme, it is not a FOR loop. Its syntax follows:

FORALL index IN lower_bound..upper_bound
sql_statement;

The index can be referenced only within the FORALL statement and only as a collection subscript.
The SQL statement must be an INSERT, UPDATE, or DELETE statement that references collection elements. And, the bounds must specify a valid range of consecutive index numbers.
The SQL engine executes the SQL statement once for each index number in the range."

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a nested table in word?

532


What is not null in sql?

574


What is the clause we need to add in function body to return variable?

538


explain about mysql and its features. : Sql dba

548


What is compute?

560






What is rowid in sql?

509


How many functions are there in sql?

538


Can we perform dml in function?

593


can a stored procedure call itself or recursive stored procedure? : Sql dba

578


What is use of term?

619


Can you sum a count in sql?

559


How do you use join?

524


Explain aggregate functions are available there in sql?

534


what are the difference between clustered and a non-clustered index? : Sql dba

528


Which language is used in sql?

518