SQL - two months from todays date in Oracle

前端 未结 4 920
暖寄归人
暖寄归人 2021-01-18 18:23

I have a column that stores the last modified date. I want to check in a SQL query if its value is more than 2 months from the current date.

I know I need to use SYS

4条回答
  •  不要未来只要你来
    2021-01-18 18:28

    Here is a query that will give the last 2 month data based on the current date.

    SELECT * FROM tableName WHERE created_on >= add_months(sysdate, -2);
    

提交回复
热议问题