1. Home
  2. Computing & Technology
  3. Databases

Exact Numeric Data Types in SQL Server

By Mike Chapple, About.com

The exact numeric data types are the most common SQL Server data types used to store numeric information. The approximate numeric data types provide less precision and are less commonly used.

Data types in the exact numeric category include:
  • int variables store 4-byte whole numbers ranging from -2,147,483,648 to 2,147,483,647.
  • bigint variables store 8-byte whole numbers ranging from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
  • smallint variables store 2-byte whole numbers ranging from -32,768 to 32,767.
  • tinyint variables store 1-byte whole numbers ranging from 0 to 255.
  • decimal and numeric variables are functionally equivalent and store numbers of fixed precision and scale. Precision indicates the maximum number of digits that may be stored (including those before and after the decimal point. Scale indicates the number that may be stored to the right of the decimal point.
  • money variables store 8-byte currency values ranging from -922,337,203,685,477.5808 to 922,337,203,685,477.5807. They may reflect any currency type.
  • smallmoney ] variables store 4-byte currency values ranging from -214,748.3648 to 214,748.3647. They may reflect any currency type.
If the exact numeric data types don’t suit your needs, read more about other SQL Server data types.
Explore Databases
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Databases
  4. SQL Server
  5. Exact Numeric Data Types in SQL Server>

©2009 About.com, a part of The New York Times Company.

All rights reserved.