Define default value for number variable
SQL>
SQL> -- assign default value
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 dbms_output.put_line(' l_weeks_in_month ' || l_weeks_in_month);
7 dbms_output.put_line(' l_weeks_in_month ' || l_weeks_in_month);
8 end;
9 /
l_weeks_in_month 5
l_weeks_in_month 5
PL/SQL procedure successfully completed.
SQL>
Related examples in the same category