Call (800) 766-1884 for Oracle support & training
Free Oracle Tips


Oracle Consulting Support
Oracle Upgrades
Use New Oracle Features
Oracle Replication Support
Oracle Training
Remote Oracle DBA
System Documentation
Oracle Tips
Oracle Performance
 

Free Oracle Tips


 

HTML Text

BC Oracle tuning

Oracle training

Oracle support

Remote Oracle

 

 

   
  Oracle Tips by Burleson

Improper Loop Termination

Just because you can do something, doesn’t mean you should do it.  When a loop is implemented in PL/SQL it should terminate in the designed manner.  The PL/SQL WHILE loops terminate when the test condition becomes false, and FOR loops terminate after the defined number of iterations.  The EXIT and EXIT WHEN  (condition = true) statements will exit all loops but should only be used on endless loops.  If you find that you need them on a FOR or WHILE loop, you have probably chosen the wrong loop structure to implement. 

The GOTO statement should never be used inside a loop to jump out of the loop.  Using the GOTO statement to terminate a loop will make your code harder to understand and more difficult to maintain.


The above book excerpt is from:

Easy Oracle PL/SQL Programming

Get Started Fast with Working PL/SQL Code Examples

ISBN 0-9759135-7-3   

John Garmany 

http://www.rampant-books.com/book_2005_1_easy_plsql.htm

  
 

Oracle performance tuning software 
 
 
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 

 

   

Copyright © 1996 -  2011 by Burleson Enterprises. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.