using the DEFAULT keyword to assign a value to a variable: : Default Value « PL SQL « Oracle PL / SQL






using the DEFAULT keyword to assign a value to a variable:

 
SQL>
SQL>
SQL> declare
  2    l_days_in_week constant number := 7;
  3    l_weeks_in_month number default 4;
  4  begin
  5    l_weeks_in_month := 5;
  6  end;
  7  /

PL/SQL procedure successfully completed.

SQL>

 








Related examples in the same category

1.Assign default value
2.avoid declaration exception for default value