我要是查询一下,5年前入职的员工信息怎么弄
select * from emp where (sysdate - regdate ) > (365 * 5);
日期相减可以获取相隔天数。
select * from 员工表 where month_between(sysdate,入职日期) = 5*12;
或者:select * from 员工表 where 入职日期<(add_months(sysdate,-300));