Saturday 17 February 2018

MSSQL - Round decimal to 2 decimal places

Watch on YouTube

Declare @amount As Decimal = 10.9999
Select Convert(Decimal(10,2) , @amount) As Amount

will produce 11.00


Declare @amount As Decimal = 10.1234
Select Convert(Decimal(10,2) , @amount) As Amount

will produce 10.00

No comments:

Post a Comment