Difference between numeric, float and decimal in SQL Server

后端 未结 8 1446
半阙折子戏
半阙折子戏 2020-11-22 04:27

What are the differences between numeric, float and decimal datatypes and which should be used in which situations?

For any ki

8条回答
  •  爱一瞬间的悲伤
    2020-11-22 05:13

    Not a complete answer, but a useful link:

    "I frequently do calculations against decimal values. In some cases casting decimal values to float ASAP, prior to any calculations, yields better accuracy. "

    http://sqlblog.com/blogs/alexander_kuznetsov/archive/2008/12/20/for-better-precision-cast-decimals-before-calculations.aspx

提交回复
热议问题