Skip Headers
Oracle® Database PL/SQL Language Reference
11g Release 2 (11.2)

Part Number E17126-03
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF


The INLINE pragma specifies that a subprogram invocation is, or is not, to be inlined. Inlining replaces a subprogram invocation (to a subprogram in the same program unit) with a copy of the invoked subprogram.



inline_pragma ::=

Description of the illustration pragma_inline.gif



The name of a subprogram.


If PLSQL_OPTIMIZE_LEVEL=2, 'YES' specifies that the subprogram invocation is to be inlined.

If PLSQL_OPTIMIZE_LEVEL=3, 'YES' specifies that the subprogram invocation has a high priority for inlining.


Specifies that the subprogram invocation is not to be inlined.


The INLINE pragma affects only the immediately following declaration or statement, and only some kinds of statements.

When the INLINE pragma immediately precedes one of these statements, the pragma affects every invocation of the specified subprogram in that statement (see Example 12-1):

The INLINE pragma does not affect statements that are not in the preceding list.

When the INLINE pragma immediately precedes a declaration, it affects:

If the name of the subprogram (identifier) is overloaded (that is, if it belongs to multiple subprograms), the INLINE pragma applies to every subprogram with that name (see Example 12-2). For information about overloaded subprogram names, see "Overloaded Subprograms".

The PRAGMA INLINE (identifier, 'YES') very strongly encourages the compiler to inline a particular invocation, but the compiler might not to do so if other considerations or limits make the inlining undesirable. If you specify PRAGMA INLINE ( identifier,'NO'), the compiler does not inline invocations of subprograms named identifier (see Example 12-3).

Multiple pragmas can affect the same declaration or statement. Each pragma applies its own effect to the statement. If PRAGMA INLINE(identifier,'YES') and PRAGMA INLINE (identifier,'NO') have the same identifier, 'NO' overrides 'YES' (see Example 12-4). One PRAGMA INLINE (identifier,'NO') overrides any number of occurrences of PRAGMA INLINE (identifier,'YES'), and the order of these pragmas is not important.


Related Topics