SQL Server: Calculation with numeric literals

前端 未结 4 1214
梦谈多话
梦谈多话 2021-02-14 10:17

I did some testing with floating point calculations to minimize the precision loss. I stumbled across a phenomen I want to show here and hopefully get an explanation.

Wh

4条回答
  •  庸人自扰
    2021-02-14 11:07

    To write a constant float expression, try to use scientific notation:

    select (1.0E0 / (1.0E0 / 60.0E0))

    The result is 60.

提交回复
热议问题