On 2002-03-18 10:47:33 -0500, Jason Erickson wrote:
> are you saying that FLOAT(16,3) is not a valid declaration for Mark's
> 'float_col', or that there's something in MySql that won't do it??

Mark didn't say how he defined the columns exactly, just "float" and
"double", so I assumed that he didn't specify the precision. If you
don't specify the precision, MySQL will store a float as a standard
IEEE-754 single precision floating point number and a double as an
IEEE-754 double precision floating point number.

> I can't find anything in Monty's MySql book (Appendix B, pg. 502) that
> indicates this would be an invalid declaration...

It isn't invalid, but it seems that the manual is misleading here. It
says:

  When the keyword FLOAT is used for a column type without a precision
  specification, MySQL uses four bytes to store the values. 

To me this implies that if you do specify a precision, MySQL chooses an
appropriate longer type (presumably double), but this doesn't seem to be
the case (at least not with 3.23.49, which is what I have here).

        hp

-- 
   _  | Peter J. Holzer      | My definition of a stupid question is
|_|_) | Sysadmin WSR / LUGA  | "a question that if you're embarassed to
| |   | [EMAIL PROTECTED]        | ask it, you stay stupid."
__/   | http://www.hjp.at/   |    -- Tim Helck on dbi-users, 2001-07-30

Attachment: msg09750/pgp00000.pgp
Description: PGP signature

Reply via email to