I am faily new to SQL and I am trying to construct a query that returns all records with a specified date field is 1 year old or more.
I have been rummaging through all the online SQL references, tutorials, etc for the last frew hours and all I have found is CURRENT_DATE which returns a DATE value for the current system date. I have also found refernences to the INTERVAL function, which I believe can specify date or time intervals.
I think perhaps that these two applied together could perhaps provide an expression I could use in a where clause. but I cannot figure out the syntax, or even if I am on the right track.
Basically what I want to accomplish is
SELECT * FROM TABLE
WHERE TABLE.DATEFIELD < CURRENT_DATE-(1 YEAR)
But I do not know how to do this.
Any help is greatly appreciated
Thanks,
Eric