Return statement and OUT Parameters

What are Return Statement and OUT Parameter in PLSQL Function?

Questions by ramyaselvi16   answers by ramyaselvi16

Showing Answers 1 - 6 of 6 Answers

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.

In case we wanted to return more than one value from function, use of ref cursor is preferred solution not OUT parameters.

Functions always return a value.

Procedures do not.

The use of IN, OUT, and IN_OUT parameters as scalar values or ref cursors is dependent on your need and overall performance not on a pseudo-standard as answered above.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions