MySQL Forums
Forum List  »  Newbie

Re: Changing all values in a column
Posted by: Peter Brawley
Date: January 30, 2011 03:24PM

> length = 2 and decimals = 1

Type double will have rounding errors. The column should be DECIMAL(2,1).

>I want to change the values inside this "c"-column who have the value "0.0"
>(and ONLY THESE ONES!) into the value "0.2".

Not possible if the column is double, If it is DECIMAl then

update a.b set c=0.2 where c=0.0;

PB

Options: ReplyQuote


Subject
Written By
Posted
Re: Changing all values in a column
January 30, 2011 03:24PM


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.