BUG: Double Precision Synonym Mapped to REAL Instead of FLOAT

ID: Q199054


The information in this article applies to:
  • Microsoft SQL Server version 7.0

BUG #: 53260 (SQLBUG_70)

SYMPTOMS

The "float and real (T-SQL)" topic in the SQL Server 7.0 Books Online defines the synonym for 'double precision' as float(53). The number 53 is the maximum number of bits used to store the mantissa of the number in scientific notation. The storage size for the float(53) data type is 8 bytes with a precision of 15 digits.

If a table is defined with a double precision column immediately following a character or varchar datatype, the 'double precision' synonym is mapped to a REAL data type. A REAL data type has precision of float(24), with a storage size of 4 bytes and a precision of 7 digits.

The following example demonstrates this behavior:


create table <tablename>
(
   strData      char(1),
   fData      double precision
)
go 


This can be verified by executing either of the following statements:


   Exec Sp_help <tablename>
   Exec Sp_columns <tablename> 


WORKAROUND

To work around this problem, replace the synonym for 'double precision' with float(53) and the column definition is maintained.


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 7.0.

Additional query words: BOL SQLBOL datatype datatypes types char

Keywords : SSrvProg kbbug7.00
Version : winnt:7.0
Platform : winnt
Issue type : kbbug


Last Reviewed: January 30, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.