MySQL Forums
Forum List  »  InnoDB

Re: Defering the DATETIME field values in a SQL table
Posted by: Charles Van Damme
Date: January 16, 2009 02:11PM

Can anyone rectify the following statement ?
UPDATE visits SET datum = datum + (SELECT CURDATE() - (SELECT MIN(Datum) FROM visits))
to add an offset to all the dates of a table. The offset is the difference between the current date and the oldest date of the original table.
Thanks in advance.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Defering the DATETIME field values in a SQL table
2189
January 16, 2009 02:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.