Rounding all Numbers in Database table
11,087
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.
Author by
coolblue2000
Updated on June 04, 2022Comments
-
coolblue2000 almost 2 years
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