java - How to delete rows which have a field greater than 24 hours -


I have a table that has 2 user names and a date - I need a way of processing on the table so that the date is stored 24 Hours are more than one day - then it is removed.

I think there may be a thread in my Java application that can make the choice and can do this, alternatively - there is a solution that can be prepared on the database side? For example, a stored procedure?

Thanks

You can periodically use MySQL database side Take an action on.

You can program it in Java in a program in Java:

  Scheduled ExeterService ses = Expiration. NewSingleThreadScheduledExecutor (); // executed the query for every 15 seconds ses.scheduleAtFixedRate (new runnab ()) {@Override Public Zero Run (// to delete the appropriate data}}, 0, 15, TimeUnit.SECONDS;  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -