查询当前时间1个月以前的时间:

select add_months(sysdate,-1) from dual;

查询当前时间1个月以后的时间:

 

select add_months(sysdate,1) from dual;

 

如对公司员工表:查询2年前进入公司的员工的姓名:

 

select Ename from Company where sysdate >add_months(time,2*12);

 

 

 

相关文章:

  • 2021-12-19
  • 2022-12-23
  • 2022-01-11
  • 2022-01-12
  • 2021-11-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-28
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
相关资源
相似解决方案