BUG: Double Precision Synonym Mapped to REAL Instead of FLOAT (199054)
The information in this article applies to:
This article was previously published under Q199054
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 7.0.
Modification Type: | Major | Last Reviewed: | 10/16/2002 |
---|
Keywords: | kbBug KB199054 |
---|
|