I have huge table where occasionally one column got not rounded values, e.g. 16345.462500 instead of 16345.460000
I'm not that good in postgres - maybe it's possible to update table rounding those values?
I can't change field type, because some rows (cryptocurrencies) can contain not rounded numbers.
Easiest thing I can think about is PHP script to manually update all fields.
You can use the round
function to round to N decimal places - in your case, 2:
UPDATE mytable
SET mycolumn = ROUND(mycolumn, 2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With