Why doesn't this round up? SELECT ROUND(4.524965325714286, 2);


I'd have thought that should be 4.53, because


6 rounds 8 to 9
9 rounds 2 to 3
3 leaves 4 as 4
..
so. it ends up lastly doing 4.525 rounds to 4.53


It looks like it's doing


I want 4.524965325714286 as 2 decimal places
Q: What's the third decimal? A: 4
4 doesn't round up
Return 4.52


Is that a correct representation of what happens?

I'm using MySQL version 5.7.20
When it is looking at rounding it only looks at the next decimal place to see which direction to round. So in your case it is seeing 4.524 which does not round up to 4.53. I have never heard of a system that rounds up all decimal values until it gets to your limit.

Think of it this way if 2 decimal points is what is important (think a lot of currencies) would you really want the 4th or later decimal value to impact what is calculated for a payment amount?