Oracle PL/SQL - PL SQL Function Procedure Package Overloading function


You can overload function in PL/SQL.

You can declare local or packaged stored procedures with exactly the same name, as long as their parameters are different.

You can overload a function by:

  • the number of parameters,
  • names of parameters,
  • order of parameters, or
  • the datatype family of the parameters.

Restrictions on overloading

You can't overload standalone procedures or functions.

The second definition simply overwrites the first one.

You can't overload functions that differ only by the datatype of the return value.

If you need to implement this by using overloaded procedures with OUT parameters.

Related Topics