SQL Server round after division

后端 未结 2 648
无人及你
无人及你 2021-01-19 15:17

In a stored procedure I have an expression like

select @some_val_in_percents = (@total_val / 100) * @some_val

If I use the Round

2条回答
  •  无人共我
    2021-01-19 16:17

    Round will be calculated after its contents is evaluated.

    Therefore (@total_val / 100) * @some_val will be rounded.

提交回复
热议问题