2

Considering this code:

DECLARE @Price AS DECIMAL(25,10) = 1231234.9898989142

DECLARE @TABLE AS TABLE 
                  (
                        Number DECIMAL(19,4)
                  )

INSERT INTO @TABLE 
VALUES (@Price)

SELECT * 
FROM @TABLE

SELECT ROUND(@Price, 4)

Can we count on the column decimal scale value to always round the number or should we use the ROUND() function to round the number before inserting into the table?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

0 Answers0