• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 12. Numbers and Text > Numeric and Monetary Values

Numeric and Monetary Values

Both SQL Server and the .NET Framework provide a number of physical representations of numeric and monetary data types, as shown in Table 12-1. From a user's perspective, however, there are really only three types—whole numbers, real numbers, and percentages. Actually, there are four—real people think in fractions, even if they have to be translated to real numbers for storage.

Table 12-1. The Physical Representations of Numeric and Monetary Values in SQL Server and the .NET Framework
SQL Server Data TypeSqlDbType.NET Framework Data TypeDescription
bigintBigIntInt6464-bit signed integer
intIntInt3232-bit signed integer
smallintSmallIntInt1616-bit signed integer
tinyintTinyIntByte8-bit unsigned integer
decimal (numeric)DecimalDecimalFixed precision and scale numeric value between –1038 and (1038–1)
floatFloatDoubleFloating point number between (–1.79E + 308) and (1.79E + 308)
realRealSingleFloating point number between (–3.40E + 38) and (3.40E + 38)
moneyMoneyDecimalCurrency value between –263 and (263–1)
smallmoneySmallMoneyDecimalCurrency value between –214,748.3648 and +214,748.3647



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint