1.

When Should A Procedure And A Function Be Used?

Answer»

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.

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.



Discussion

No Comment Found