Named notation : IN Parameters « Function Procedure Packages « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> CREATE OR REPLACE PROCEDURE show_line(ip_line_length IN NUMBER,ip_separator IN VARCHAR2)
  2  IS
  3    myString VARCHAR2(150);
  4  BEGIN
  5
  6    FOR idx in 1..ip_line_length LOOP
  7
  8      myString := myString || ip_separator;
  9
 10    END LOOP;
 11
 12    DBMS_OUTPUT.PUT_LINE(myString);
 13
 14  EXCEPTION WHEN OTHERS THEN
 15
 16    dbms_output.put_line(SQLERRM);
 17
 18  END;
 19  /

Procedure created.

SQL>
SQL>
SQL>
SQL>
SQL> DECLARE
  2
  3    v_length NUMBER :=50;
  4
  5    v_separator VARCHAR2(1):='=';
  6
  7  BEGIN
  8
  9    show_line(ip_line_length=>v_length,ip_separator=>v_separator);
 10
 11  END;
 12  /








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