Write a number with two decimal places SQL server
问题 How do you write a number with two decimal places for sql server? 回答1: try this SELECT CONVERT(DECIMAL(10,2),YOURCOLUMN) 回答2: Use Str() Function. It takes three arguments(the number, the number total characters to display, and the number of decimal places to display Select Str(12345.6789, 12, 3) displays: ' 12345.679' ( 3 spaces, 5 digits 12345, a decimal point, and three decimal digits (679). - it rounds if it has to truncate, (unless the integer part is too large for the total size, in