What was the rationale for the Money data type?

Possible duplicate:
Should you choose MONEY or DECIMAL (x, y) data types in SQL Server?

I do not understand why you are using the money data type over decimal , except for currency descriptors, it seems equivalent to a decimal scale with a 4 scale.

Did I miss something?


Update: what served as the basis for the introduction of the money data type? Rather, to argue about whether you should divide money by money , which, apparently, came down to another question.

+4
source share
1 answer

"Syntactic sugar about removing currency symbols"? - SQL Server does not save currency characters. And this has nothing to do with the compiler, which does fantastic compilation tricks, which is what syntactic sugar means. The decimal type is the exact data type, and money is no more than four decimal places or so. It depends on your needs. You probably won't go wrong just using the decimal type.

0
source

Source: https://habr.com/ru/post/1339980/


All Articles