SQL>
SQL> DECLARE
2 hire_date TIMESTAMP WITH TIME ZONE;
3
4 a INTERVAL YEAR TO MONTH;
5 b INTERVAL DAY TO SECOND;
6 BEGIN
7 hire_date := TIMESTAMP '2000-09-01 00:00:00 -5:00';
8 DBMS_OUTPUT.PUT_LINE(hire_date);
9
10 a := INTERVAL '1-2' YEAR TO MONTH;
11 b := INTERVAL '3 4:5:6.7' DAY TO SECOND;
12
13 hire_date := hire_date + a;
14 DBMS_OUTPUT.PUT_LINE(hire_date);
15
16 END;
17 /
PL/SQL procedure successfully completed.
|