PL/SQL functions in oracle

Published on by LakshmiSaahul,Dhana Royal

PL/SQL functions block create using CREATE FUNCTION statement. The major difference between PL/SQL function or procedure, function return always value where as procedure may or may not return value.

When you create a function or procedure, you have to define IN/OUT/INOUT parameters parameters.

  1. IN : IN parameter referring to the procedure or function and allow to overwritten the value of parameter.
  2. OUT : OUT parameter referring to the procedure or function and allow to overwritten the value of parameter.
  3. IN OUT : Both IN OUT parameter referring to the procedure or function to pass both IN OUT parameter, modify/update by the function or procedure and also get returned.

IN/OUT/INOUT parameters you define in function argument list that get returned back to a result. When you create the function default IN parameter is passed in argument list. It's means value is passed but not returned. Explicitly you have define OUT/IN OUT parameter in argument list.

Advertising
To be informed of the latest articles, subscribe:
Comment on this post