Selecting records where date range is current year minus #years

oracle

I want to select and eventually delete records from a point in time earlier than current year minus "x" years.

I'm unsure of the most efficient way to do this.

Best Answer

This will delete anything three years older than January 1st of this year.

DELETE table_name 
WHERE change_date < ADD_MONTHS(TRUNC(SYSDATE, 'YYYY'), -36);