Friday 25 May 2012

When should a procedure and a function be used? | pl sql

 Procedure is used when there are more than one return values however, if there is only one return value, then a function should be used. Although functions may have more than one OUT parameters, it is considered as a poor programming style.
In addition, when a subprogram has to be invoked within an SQL statement, function should be used.