it s enough to round a column value in plsql by using round(value,2). For example 1.2222 can be converted to 1.22 by that function in plsql.
How can I do that in SQL Server? When I use round(1.2222,2), it converts 1.2200. I want 1.22. Thanks for help
Mathematically, 1.2200 and 1.22 are the exact same number.
The display of the number is actually a string that is different from the physical content of the number, so the number is rounded the same in SQL Server and Oracle, it’s just displayed diferently.
More, about SQL float point types: if you declare a variable as having a s decimal places, it will always display as having s decimal places, regardless of the value, for example
However, there is a technical difference about the meaning of 3.00 and 3.0000, and that’s the relative error of the number. Since all real numbers are rounded, 3.00 actually means 3 +/- 0.005 , and 3.0000 is actualy 3 +/- 0.00005, as more significant digits are known.