There are three types of formal parameters in subprograms: IN, OUT, and IN OUT. : Parameters « Function Procedure Packages « Oracle PL/SQL Tutorial






IN parameters are used to pass values into the subprogram. but can't be changed.

IN Parameters are really a constant.

IN Parameters work in only one direction from the main program to subprogram.

SQL> create or replace function getArea (i_rad NUMBER)
  2  return NUMBER
  3  is
  4  begin
  5     if i_rad is null            -- legal
  6     then
  7       -- i_rad:=10;             -- ILLEGAL
  8       return null;
  9     end if;
 10     return 3.14*(i_rad**2);     -- legal
 11  end;
 12  /

Function created.

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