在Oracle SQL中从当前日期减去30年 [英] Subtracting 30 Years from Current Date in Oracle SQL

查看:654
本文介绍了在Oracle SQL中从当前日期减去30年的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一个查询,其中选择所有30年前有生日的人.不幸的是,由于我正在使用Oracle,因此无法使用DATEADD()函数.

I need to write a query in which I select all people who have a date of birth over 30 years ago. Unfortunately, as I am using Oracle I cannot use the DATEADD() function.

我目前有这个,但是显然这不是动态的,并且不会随着时间的流逝而改变:

I have currently got this, but obviously this isn't dynamic and won't change as the years pass:

SELECT Name, DOB
FROM Employee
WHERE DOB <= DATE '1985-01-01';

推荐答案

使用 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆