SQL Language (MOSC)

MOSC Banner

Timestamp question

edited Aug 10, 2020 1:51AM in SQL Language (MOSC) 5 commentsAnswered

Hi

We are on 11g R2 database

We have table with time stamp column

There is this requirement to delete any records older then 60 days from the date we run the DELETE statement

We will run this DELETE on the first of every month and the idea is to be able to delete anything older than 2 months from today appx and there is no need for precise calculation (to minutes hours seconds etc)

Assuming today is 1st of August, and we run that SQL we would want to delete all the records older than June 1st

The timestamp column name is DT_TIMSTAMP and table name is TRX_STAGE

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center