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 SYSDATE but am not familiar with date stuff in Oracle so am unsure as to the rest.
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 SYSDATE but am not familiar with date stuff in Oracle so am unsure as to the rest.
SELECT * from table where date_column >= add_months(TRUNC(SYSDATE) + 1, 2);
try this
SELECT field1,field2 from yourtable where field_date > add_months(SYSDATE, 2);
Bye