When to use Money data or Decimal Data type in sql server to store costing values?

user3378215 picture user3378215 · Mar 12, 2014 · Viewed 25.3k times · Source

What is preferable data type to store the costing value ? Money or Decimal whats the programmatic diff bet them? asp.net Data Annotation for asp.net Model for Money data type ?

Answer

Raging Bull picture Raging Bull · Mar 12, 2014

Decimal type provides more precision to hold intermediate results to get the results you expect.

Disadvantages of money datatype:

  1. It is proprietary, so porting it is a pain. It is one of the many "Sybase Code Museum" features from decades ago. Remember the early versions of UNIX?

  2. Writing code in dialect when you don't need to make you sound like a hillbilly to people that speak the language. You are better off with DECIMAL(s,p) so you can use a properly sized column.

  3. It does display and formatting in the back end, with commas and dollar signs. That defeats the purpose of a tiered architecture.

  4. The MONEY data type has rounding errors.

Ref:msdn