PROBLEMS UNDERSTANDING FLOAT/DOUBLE COLUMN TYPES

First could you clarify the contradictions from the following extracts of
the manual.


7.3 Column types

The column types supported by MySQL are listed below. The following code
letters are used in the descriptions: 

M Indicates the maximum display size. The maximum legal display size is
255. 
D Applies to floating-point types and indicates the number of digits
following the decimal point. The maximum possible value is 30, but should
be no greater than M-2. 

Square brackets (`[' and `]') indicate parts of type specifiers that are
optional. 

Note that if you specify ZEROFILL for a column, MySQL will automatically
add the UNSIGNED attribute to the column.


FLOAT[(M,D)] [ZEROFILL] 
       A small (single-precision) floating-point number. Cannot be
unsigned. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0 and 
1.175494351E-38 to 3.402823466E+38. The M is the display width and D is the
number of decimals. FLOAT without an argument or with an argument of     <=
24 stands for a single-precision floating point number. 
DOUBLE[(M,D)] [ZEROFILL] 
       A normal-size (double-precision) floating-point number. Cannot be
unsigned. Allowable values are -1.7976931348623157E+308 to
       -2.2250738585072014E-308, 0 and 2.2250738585072014E-308 to
1.7976931348623157E+308. The M is the display width and D is the number of 
 decimals. DOUBLE without an argument or FLOAT(X) where 25 <= X <= 53
stands for a double-precision floating point number.

7.7 CREATE TABLE syntax

DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL]
FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL]
DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL]
NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL]


As you can see from the above the FLOAT/DOUBLE columns cannot be unsigned
or can they?.

Second problem what is "Allowable values are -3.402823466E+38 to
-1.175494351E-38, 0 and  1.175494351E-38 to 3.402823466E+38 "
in real numbers I.E. how many digits?.


Thanking you in advance



Keith Stokes

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to