Procedure with default parameter value : Default Parameter Value « Stored Procedure Function « Oracle PL / SQL






Procedure with default parameter value

 
SQL>
SQL>
SQL> create or replace
  2    procedure default_values(
  3    p_parm1 varchar2,
  4    p_parm2 varchar2 default 'AAA',
  5    p_parm3 varchar2 default 'BBB' ) as
  6  begin
  7    dbms_output.put_line( p_parm1 );
  8    dbms_output.put_line( p_parm2 );
  9    dbms_output.put_line( p_parm3 );
 10  end default_values;
 11  /

Procedure created.

SQL>
SQL>  set serverout on
SQL>
SQL>  exec default_values( 'Tom', p_parm3 => 'Joe' );
Tom
AAA
Joe

PL/SQL procedure successfully completed.

SQL>

           
         
  








Related examples in the same category

1.Parameter with default NULL value
2.Demonstrates default parameters.
3.Parameter with default value