Collections:
Approximate Numeric Data Types in SQL Server Transact-SQL
What are approximate numeric data types supported in SQL Server Transact-SQL?
✍: FYIcenter.com
Approximate numeric data types are used to hold
numeric values with floating scales.
There are 3 different approximate numeric data types supported in SQL Server Transact-SQL:
1. FLOAT - Used to hold values with different precisions and floating scales specified in the format of FLOAT(p), where p is the precision presenting the number of bits used to store the mantissa part. For example, FLOAT(12) stores floating numbers with a 12-bit mantissa.
2. DOUBLE PRECISION - Use to hold values with a large precision and floating scales using 8-byte storage to store floating numbers in the ranges of -1.79E+308 to -2.23E-308, 0 and 2.23E-308 to 1.79E+308. DOUBLE PRECISION is identical to FLOAT(53).
3. REAL - Use to hold values with a normal precision and floating scales using 4-byte storages to store floating numbers in the ranges of -3.40E+38 to -1.18E-38, 0 and 1.18E-38 to 3.40E+38.
Here are some good examples of approximate numeric values:
PRINT 9.22337203685e+010; -- FLOAT(53) PRINT 9.22337e+010; -- FLOAT(24)
⇒ Precision and Rounding of FLOAT Values in SQL Server Transact-SQL
⇐ Overflow and Rounding on NUMERIC Values in SQL Server Transact-SQL
2017-04-19, 2960🔥, 0💬
Popular Posts:
How To Convert Binary Strings into Hexadecimal Character Strings in SQL Server? When a query returns...
Where to find SQL Server database server tutorials? Here is a collection of tutorials, tips and FAQs...
How To Look at the Current SQL*Plus System Settings in Oracle? If you want to see the current values...
What is dba.FYIcenter.com Website about? dba.FYIcenter.com is a Website for DBAs (database administr...
What are DDL (Data Definition Language) statements for tables in SQL Server? DDL (Data Definition La...