[转]Difference between numeric,float and decimal in sql server

more useful information extracted from the cited book

  • numeric(precision, scale) = decimal(precision, scale) - Exact Numeric Data Types
  • real = float(24) - Approximate Numeric Data Types
  • All exact numeric types always produce the same result, regardless of which kind of processor architecture is being used or the magnitude of the numbers
  • The parameter supplied to the float data type defines the number of bits that are used to store the mantissa of the floating point number.

Exact Numeric Data Types Approximate Numeric Data Types

source :

MCTS Self-Paced Training Kit (Exam 70-433): Microsoft® SQL Server® 2008 Database Development

Chapter 3 - Tables , Data Types , and Declarative Data Integrity Lesson 1

Choosing Data Types (Guidelines) - Page 93

MCTS Self-Paced Training Kit (Exam 70-433): Microsoft® SQL Server® 2008 Database Development

原文地址:https://www.cnblogs.com/liutingrex/p/2847646.html