in my table, there is a column called submittime, the value for this column is the current time when the row was created.
my questions is, after certain time, say one year, i want to check those rows in the table. if some rows haven't been updated by user for one year since last time updating, i want to make this row inactive .
my question is:
should i compare the value of submittime with the current time in a sql query in java, something like:
select user_id from mymembertable where current timestamp - submittime < 1 year;
or i should select user_id and submittime from the table first, then taransfer submittime
to milliseconds, then compare it with current time also in java
looks like the first way is more simpler?
thanks so much for your reply,