Monday 28 October 2013

What are Return Statement and OUT Parameter in PLSQL Function?

Function must have return statement by which it returns one value.

Though we can use out parameter in function (function not getting called from select statement or DML), it is not good programming practice to write OUT and IN OUT in function. In case we wanted to return values using OUT parameters, always use procedures.
Note: In case we wanted to return more than one value from function, use of ref cursor is preferred solution not OUT parameters.

No comments:

Post a Comment