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.
精彩评论