Using MySQL 5.0.27
This query: SELECT CAST('543.21' AS DECIMAL(100,2))
returns 543.21
So does this one: SELECT CAST('543.21' AS DECIMAL(2,2))
In fact, I am having trouble figuring out what effect the parameter has. I am using it to aggregate numeric values in a varchar column (for legacy reasons!!) and round off to 2 decimal places.
Should I just pick a high number?