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






Parameter with default NULL value

  
SQL>
SQL> CREATE OR REPLACE PROCEDURE CallProc1(p1 IN VARCHAR2 := NULL) AS
  2  BEGIN
  3    DBMS_OUTPUT.PUT_LINE('CallProc1 called with ' || p1);
  4  END CallProc1;
  5  /

Procedure created.

SQL>
SQL> CALL CallProc1('Hello!');
CallProc1 called with Hello!

Call completed.

SQL> CALL CallProc1();
CallProc1 called with

Call completed.

SQL>
SQL>

   
  








Related examples in the same category

1.Procedure with default parameter value
2.Demonstrates default parameters.
3.Parameter with default value