07-31-2023, 09:54 AM
If you desire to take some number like `89.0904987` and turn it into `89.09` by simply omitting the undesired decimal places, simply use the following:
select cast(yourColumnName as decimal(18,2))
The following screenshot is from [W3Schools SQL Data Types][1] section, which describes what `decimal(18,2)` is doing:
[![Screenshot from
Therefore,
select cast(89.0904987 as decimal(18,2))
gives you: `89.09`
[1]:
select cast(yourColumnName as decimal(18,2))
The following screenshot is from [W3Schools SQL Data Types][1] section, which describes what `decimal(18,2)` is doing:
[![Screenshot from
[To see links please register here]
][2]][2]Therefore,
select cast(89.0904987 as decimal(18,2))
gives you: `89.09`
[1]:
[To see links please register here]
[2]: