1. 程式人生 > >8.1 加減日、月、年

8.1 加減日、月、年

加減 val nth ear edate tno minus date bsp

select hiredate - interval 5 day as hd_minus_5D,
hiredate + interval 5 day as hd_plus_5D,
hiredate - interval 5 month as hd_minus_5M,
hiredate + interval 5 month as hd_plus_5M,
hiredate - interval 5 year as hd_minus_5Y,
hiredate + interval 5 year as hd_plus_5Y
from emp
where deptno=10;

8.1 加減日、月、年