Data care va fi peste exact 2 ani, doua luni si
34 zile se obtine astfel:
SELECT SYSDATE AS Azi, SYSDATE +INTERVAL ‘2-2’ YEAR
TO MONTH +34, SYSDATE +INTERVAL ‘2-2’ YEAR(1) TO MONTH +34
SELECT marca, data_angaj, MONTHS_BETWEEN (SYSDATE, data_angaj)
VECHIME, ADD_MONTHS (data_angaj, 6) PROBA,
NEXT_DAY (data_angaj, ‘Friday’), LAST_DAY (data_angaj)
FROM angajati
WHERE MONTHS_BETWEEN (SYSDATE, data_angaj) <36;
SELECT marca, data_angaj,
ROUND ( data_angaj, ‘MONTH’), TRUNC (data_angaj,‘MONTH’)
FROM angajati
WHERE data_angaj LIKE ‘%97’;