IN Parameters in action : IN Parameters « Function Procedure Packages « Oracle PL/SQL Tutorial






SQL>
SQL> create or replace function getArea (i_rad NUMBER)
  2  return NUMBER is
  3  begin
  4      return 3.14*(i_rad**2);
  5  end;
  6  /

Function created.

SQL>
SQL> declare
  2     v_out NUMBER;
  3     v_in1  CONSTANT NUMBER :=5;
  4     v_in2   NUMBER :=4;
  5
  6  begin
  7      v_out:=getArea(10);       -- literal
  8      v_out:=getArea(v_in1); -- constant
  9      v_out:=getArea(v_in1); -- variable
 10      v_out:=getArea(2+3);      -- expression
 11      v_out:=getArea(abs(2/3)); -- another function
 12  end;
 13  /

PL/SQL procedure successfully completed.

SQL>
SQL>








27.15.IN Parameters
27.15.1.IN Parameters in action
27.15.2.Named notation
27.15.3.Mixed notation
27.15.4.myProc procedure with a default value for one parameter
27.15.5.myProc procedure with a default value for both parameters