sqlserver fixed decimal data retention, storage rounded

  After the encounter in the amount of retained rounding actual business, retention needs two decimal places. But the original data is six decimal keep, you need to convert it. Specific procedures are as follows:

EG:SELECT CAST ( ROUND(1965.12540,2) AS decimal(10,2))  

round can be rounded, but the effect is not exactly what you want, as shown below:

 

 

Guess you like

Origin www.cnblogs.com/kekelele/p/11671673.html