Update Sysdate - 10 min in Oracle

Vaandu picture Vaandu · May 24, 2012 · Viewed 18.2k times · Source

I need to update a date column, with sysdate but 10 mins past. Is there any way to do?

Please help.

Answer

a_horse_with_no_name picture a_horse_with_no_name · May 24, 2012
UPDATE the_table
   SET the_column = current_timestamp - interval '10' minute
WHERE pk = 42;

It certainly works, see here: http://sqlfiddle.com/#!4/a1986/2