Search code examples
sqloraclesqldatetime

Incrementing the values in a field of datatype DATE in Oracle


How to Write an update statement to update date_column to datecolumn+1 for all the dates in that column?

i have a column named date in my table and i want to increment all the dates by 1 day for all the records in the table.

eg:

01/JAN/2014 to 02/JAN/2014
14/NOV/2014 to 15/NOV/2014
27/MAY/2014 to 28/MAY/2014
19/AUG/2014 to 20/AUG/2014

and so on.


Solution

  • update table_name set date_column = date_column + 1;