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

8.01 加減日、月、年

plus ear day sel emp nth min sele where

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.01 加減日、月、年