MySQL Forums
Forum List  »  Newbie

Re: set column value from an experession
Posted by: Roland Bouman
Date: August 17, 2005 02:03AM

Hi,

if you're running MySQL 4.1, this query would set the diff column of table t to the number of days that the value in the date1 differs from the value in the date2 column

update t
set diff = datediff(date1,date2)

Options: ReplyQuote


Subject
Written By
Posted
Re: set column value from an experession
August 17, 2005 02:03AM


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.