开发者

What was the rationale behind the Money datatype? [duplicate]

This question already has answers here: 开发者_运维问答 Closed 11 years ago.

Possible Duplicate:

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

I can't see why you would use the money datatype over decimal, apart from stripping currency symbols, it seems equivalent to a decimal with a scale of 4.

Am I missing something?


Update: What was the rationale behind introducing Money datatype? Rather that arguing about whether you should divide money by money which is what the other question seemed to boil down to.


"Syntactic sugar about stripping currency symbols"? - SQL Server doesn't store currency symbols. And it has nothing to do with a compiler doing fancy compile time tricks, which is what "syntactic sugar" refers to. The decimal type is a precise data type and money is not, beyond four decimal places or so. It depends on your needs. You probably can't go wrong just using a decimal type.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜