In a PL/SQL block,which loop type should be used in a performance point of view & Why (as both loops can do the same task)
1) open - Fetch loop
2) for loop

Answers were Sorted based on User's Feedback



In a PL/SQL block,which loop type should be used in a performance point of view & Why (as both l..

Answer / monika

for loop is faster then open -fetch loop

Is This Answer Correct ?    1 Yes 1 No

In a PL/SQL block,which loop type should be used in a performance point of view & Why (as both l..

Answer / nidhi

yes For Loop will be faster than the open fetch loop

Is This Answer Correct ?    0 Yes 0 No

In a PL/SQL block,which loop type should be used in a performance point of view & Why (as both l..

Answer / swastik

yes for loop is faster tan loop-fetch
in loop there is exit statement to control the loop
in for loop it is an implicitly declared integer which is incremented or decremented by 1 until the upper bound or lower bound is reached

Is This Answer Correct ?    0 Yes 0 No

In a PL/SQL block,which loop type should be used in a performance point of view & Why (as both l..

Answer / mihir kar

For loop is always faster than explicitly open -fetch loop.
the main advantages of for loop is it internally works like bulk collect limit 100
it hold 100 record and fetch so it is always preferebale.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What are the subsets of sql?

0 Answers  


Explain the difference between rename and alias?

0 Answers  


Why are sql stored procedures used?

0 Answers  


what is index? : Sql dba

0 Answers  


What are the dml statements?

0 Answers  






What is rank dense_rank and partition in sql?

0 Answers  


What is ROWID?

8 Answers  


What is clustered index in sql?

0 Answers  


What is write ahead logging in sql server?

0 Answers  


Does sql backup shrink transaction log?

0 Answers  


How can you fetch first 5 characters of the string?

0 Answers  


What is a composite primary key?

0 Answers  


Categories