Using MySQL 5.0.27
This query is: SELECT CAST ('543.21' AS DECIMAL (100,2))
returns 543.21
And this one: SELECT CAST ('543.21' AS DECIMAL (2,2))
In fact, it’s hard for me to understand what effect the parameter has. I use it to combine numeric values in a varchar column (for old reasons !!) and round to two decimal places.
Should I just pick a large number?
source
share