Search notes:

Oracle PL/SQL: PRAGMA INLINE

pragma inline instructs the PL/SQL compiler to inline code.
create or replace package tq84_pkg as
    function f(a number, b number) return number;
   
    pragma inline('g', 'yes');
    function g(a number, b number) return number;
end tq84_pkg;
/
 
create or replace package body tq84_pkg as
    function f(a number, b number) return number is
    begin
        return abs(a-3) + abs(b-5);
    end f;
   
    function g(a number, b number) return number is
    begin
       pragma inline('f', 'yes');
       return f(a, b);
    end g;
end tq84_pkg;
/

See also

plsql_optimize_level.
The PL/SQL warning PLW-05011: pragma INLINE for procedure '…' does not apply to any calls.
Using inlined functions in with clauses of an SQL statement.

Index