BC remote Oracle DBA - Call (800) 766-1884  
Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation







  Oracle Tips by Burleson

Calling Procedures from PL/SQL

If calling a procedure from SQL*Plus is easy, calling it from PL/SQL is effortless.  Simply call it in the code section of any PL/SQL block

SQL> create or replace procedure get_area
  2    (n_length in number,
  3     n_width  in number,
  4     n_area  out number)
  5  as
  6  begin
  7    n_area := n_length*n_width;
  8  end get_area;
  9  / 

Procedure created.

SQL> declare
  2    n_area number :=0;
  3  begin
  4    get_area(10,20,n_area);
  5    dbms_output.put_line('Area '||n_area);
  6  end;
  7  /

Area 200

Notice that the EXECUTE clause is not used.  That is a SQL*Plus  command and not used in PL/SQL.  Also notice that the n_area variable is not passed by reference as in the SQL*Plus call.  This is because the variable is local where as in the SQL*Plus example, it was external to the database.

The Return Clause with Procedures

As shown in the next section, a PL/SQL function is required to return a value using the RETURN clause.  A procedure can also use the RETURN clause but can not return a value.  Instead, the RETURN clause terminates execution of the procedure and processing passes back to the calling code.  If the procedure was passed OUT or INOUT variables, the procedure will copy their values as of the RETURN clause.  As with the GOTO clause, using the RETURN clause to terminate a procedure is considered bad programming practice and should be avoided. 

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 


Remote DBA Service

Oracle Tuning Book


Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software







BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.