This is a discussion on Select for float field fails within the MySQL forums, part of the Database Server Software category; --> Can anyone explain the following result? FloatField1 is defined simply as FLOAT. mysql> select FloatField1 from Table1 where FloatField1 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Can anyone explain the following result? FloatField1 is defined simply as FLOAT. mysql> select FloatField1 from Table1 where FloatField1 = 0.6182; Empty set (0.10 sec) mysql> select FloatField1 from Table1 where FloatField1 >= 0.6181 and FloatField1 <= 0.6183; +-----------+ | FloatField1 | +-----------+ | 0.6182 | | 0.6182 | | 0.6182 | | 0.6182 | | 0.6182 | +-----------+ 5 rows in set (0.11 sec) |
| ||||
| On Mon, 03 Dec 2007 17:08:05 +0100, Occidental <Occidental@comcast.net> wrote: > Can anyone explain the following result? FloatField1 is defined simply > as FLOAT. > > > mysql> select FloatField1 from Table1 where FloatField1 = 0.6182; > Empty set (0.10 sec) > > > mysql> select FloatField1 from Table1 where FloatField1 >= 0.6181 and > FloatField1 <= 0.6183; > +-----------+ > | FloatField1 | > +-----------+ > | 0.6182 | > | 0.6182 | > | 0.6182 | > | 0.6182 | > | 0.6182 | > +-----------+ > 5 rows in set (0.11 sec) The manual explains: http://dev.mysql.com/doc/refman/5.0/...ith-float.html -- Rik Wasmus |
| Thread Tools | |
| Display Modes | |
|
|