Parameter Modes : Parameters « Function Procedure Packages « Oracle PL/SQL Tutorial






SQL>
SQL> CREATE OR REPLACE PROCEDURE ModeTest (
  2    p_InParameter    IN NUMBER,
  3    p_OutParameter   OUT NUMBER,
  4    p_InOutParameter IN OUT NUMBER) IS
  5
  6    v_LocalVariable  NUMBER;
  7  BEGIN
  8    v_LocalVariable := p_InParameter;  -- Legal
  9
 10    --p_InParameter := 7;  -- Illegal
 11
 12    p_OutParameter := 7;  -- Legal
 13
 14    --v_LocalVariable := p_outParameter;  -- Illegal
 15
 16    v_LocalVariable := p_InOutParameter;  -- Legal
 17
 18    p_InOutParameter := 7;  -- Legal
 19  END ModeTest;
 20  /

Procedure created.

SQL>
SQL>








27.14.Parameters
27.14.1.Defining Formal Parameters
27.14.2.There are three types of formal parameters in subprograms: IN, OUT, and IN OUT.
27.14.3.Define function with NUMBER type parameter
27.14.4.Function without parameter
27.14.5.Use IF/ELSIF/ELSE to verify the input parameter
27.14.6.Use ROWTYPE as the parameter
27.14.7.Passing parameters to procedures
27.14.8.Using Named Notation
27.14.9.Use mixed notation to avoid the second parameter, but keep the first and third
27.14.10.Parameter Modes
27.14.11.Positional Notation
27.14.12.Positional vs. named parameter passing.
27.14.13.Parameter Default Values
27.14.14.Specifying procedure or function parameters Positional notation
27.14.15.Table collection type parameter
27.14.16.Mixed Name and Position Notation Calls