Quoting of decimal values

Posted by Peter on Stack Overflow See other posts from Stack Overflow or by Peter
Published on 2010-04-01T08:42:34Z Indexed on 2010/04/01 8:43 UTC
Read the original article Hit count: 501

Filed under:
|
|

I am storing a running total in a Decimal(10,2) field and adding to it as items are processed.

update foo set bar = bar + '3.15'

About 20% of the times a warning is issued "Data truncated for column 'bar' at row 4"

This warning is never issued if the update value is not quoted. Should decimal values be quoted?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about decimal