Difference between numeric, float and decimal in SQL Server

后端 未结 8 1300
半阙折子戏
半阙折子戏 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:27

    Although the question didn't include the MONEY data type some people coming across this thread might be tempted to use the MONEY data type for financial calculations.

    Be wary of the MONEY data type, it's of limited precision.

    There is a lot of good information about it in the answers to this Stackoverflow question:

    Should you choose the MONEY or DECIMAL(x,y) datatypes in SQL Server?

提交回复
热议问题