"The float and real data types are known as approximate data types.... For many applications, the tiny difference between the specified value and the stored approximation is not noticeable. At times, though, the difference becomes noticeable. Because of the approximate nature of the float and real data types, do not use these data types when exact numeric behavior is required, such as in financial applications, in operations involving rounding, or in equality checks. Instead, use the integer, decimal, money, or smallmoney data types."
Consider column is defined as float and has a value of 0.01384981270568965. When same column value is queried from Query Analyzer then it returns 0.0138498127056897
So always choose proper data type before creating the table.
No comments:
Post a Comment