I need to round all the numbers in a column of a table to 2 decimal places (ie i need 2.109999 to become 2.11)
What is the best way to achieve this? (It only needs to be done as a one off operation)
I am using sql server 2008 R2
UPDATE table SET column = ROUND(column, 2)
If you need to modify numbers permanently. Otherwise:
SELECT ROUND(column, 2) FROM table
To keep existing values in place.
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