SQL> DECLARE
2 a1 INTERVAL DAY TO SECOND := '2 3:4:5.6';
3 b1 INTERVAL DAY TO SECOND := '1 1:1:1.1';
4
5 a2 INTERVAL YEAR TO MONTH := '2-10';
6 b2 INTERVAL YEAR TO MONTH := '1-1';
7
8 a3 NUMBER := 3;
9 b3 NUMBER := 1;
10 BEGIN
11 DBMS_OUTPUT.PUT_LINE(a1 - b1);
12 DBMS_OUTPUT.PUT_LINE(a2 - b2);
13 DBMS_OUTPUT.PUT_LINE(a3 - b3);
14 END;
15 /
PL/SQL procedure successfully completed.
SQL>
SQL>
|