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

Code Readability in PL/SQL

Code readability is important when programming.  Many times lines can be combined to reduce the size of the code but may make the code less understandable to anyone other than the author.  The example shown earlier can in fact be written with only three lines of code.

 SQL> begin
  2    dbms_output.put_line ('Hello &v_string');
  3  end;
  4  / 

Enter value for v_string: John
Hello John

White Space and Comments

As with any programming, you want your script to be as readable as possible.  Remember, you may be writing the procedure but more than likely someone else will have to update and maintain it. 

White space is added to make code more readable.  It has no impact on the execution time or efficiency of the code.  White space is use only to make the code more readable to humans.  In the examples above, the code between the begin and end key word is indented.  This makes the block boundaries easier to see in the code.  The two spaces forming the indent exists only to make the code easier to read.  Blank lines can also be used to separate sections of code.  Blank lines can appear anywhere in the code (except inside a SQLstatement).


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.