Home >> FAQs/Tutorials >> SQL Server FAQ
SQL Server FAQ - FLOAT and REAL - Approximate Numeric Data Types
(Continued from previous topic...)
What Are Approximate Numeric Data Types?
Approximate numeric data types are used to store numeric values with floating decimal points.
SQL Server 2005 supports the following approximate numeric data types:
- FLOAT - Floating point values with a fixed number of bits n for the mantissa part defined as FLOAT(n).
FLOAT values are in the range of -1.79E+308 to -2.23E-308, 0 and 2.23E-308 to 1.79E+308.
- REAL - Same as FLOAT(24), also called single precision floating point numbers.
The DOUBLE PRECISION data type is supported as a synonym of FLOAT(53).
Here are some good examples of approximate numeric values:
PRINT 9.22337203685e+010; -- FLOAT(53)
PRINT 9.22337e+010; -- FLOAT(24)
(Continued on next topic...)
- What Is SQL Language?
- What Is Transact-SQL Language?
- What Is a Transact-SQL Statement?
- How To Start and End Transact-SQL Statements?
- How To Enter Comments in Transact-SQL Statements?
- What Is a Transact-SQL Statement Batch?
- What Happens to a Statement Batch If There Is a Compilation Error?
- How To Use GO Command in "sqlcmd"?
- How To Create User Messages with PRINT Statements?
- How Many Categories of Data Types Used by SQL Server?
- What Are Exact Numeric Data Types?
- What Are Approximate Numeric Data Types?
- What Are Date and Time Data Types?
- What Are Character String Data Types?
- What Are Unicode Character String Data Types?
- What Are Binary String Data Types?
- What Are the Differences between CHAR and NCHAR?
- What Are the Differences between CHAR and VARCHAR?
- What Are the Differences between DECIMAL and FLOAT?