An assignment to var2 : INTERVAL « Data Type « Oracle PL / SQL






An assignment to var2

   
SQL>
SQL> DECLARE
  2    var2 INTERVAL YEAR(3) TO MONTH;
  3  BEGIN
  4      -- Shorthand for a 101 year and 3 month interval.
  5      var2 := '101-3';
  6  END;
  7  /

PL/SQL procedure successfully completed.

   
    
    
  








Related examples in the same category

1.Shorthand for a 101 year and 3 month interval(INTERVAL '101' YEAR)
2.Shorthand for a 101 year and 3 month interval(INTERVAL '101-3' YEAR TO MONTH)
3.Shorthand for a 101 year and 3 month interval(INTERVAL '3' MONTH)
4.This script demonstrates the use of the INTERVAL types
5.INTERVAL DAY TO SECOND