At 13:33 -0800 2/1/02, Jim Dickenson wrote:
>I am running mysql  Ver 11.15 Distrib 3.23.47, for pc-linux-gnu (i686)
>installed from a binary RPM file. This is using RedHat Linux 7.2.
>
>I have a table described as:
>mysql> describe junk;
>+--------+---------------+------+-----+---------+-------+
>| Field  | Type          | Null | Key | Default | Extra |
>+--------+---------------+------+-----+---------+-------+
>| record | decimal(3,0)  | YES  |     | NULL    |       |
>| title  | varchar(250)  | YES  |     | NULL    |       |
>| num1   | float         | YES  |     | NULL    |       |
>| num2   | decimal(6,0)  | YES  |     | NULL    |       |
>| num3   | decimal(10,3) | YES  |     | NULL    |       |
>| code   | char(3)       | YES  |     | NULL    |       |
>| sdate  | date          | YES  |     | NULL    |       |
>| stime  | time          | YES  |     | NULL    |       |
>+--------+---------------+------+-----+---------+-------+
>8 rows in set (0.00 sec)
>
>It has the following data:
>mysql> select record,num1 from junk;
>+--------+----------+
>| record | num1     |
>+--------+----------+
>|      1 |     12.3 |
>|      2 |   17.785 |
>|      3 |  138.981 |
>|      4 |   -34.12 |
>|      5 | -12.7365 |
>|      6 |    -0.34 |
>+--------+----------+
>6 rows in set (0.00 sec)
>
>The following command does not update the row I would like it to:
>mysql> update junk set num1=12.4 where num1=12.3;
>Query OK, 0 rows affected (0.01 sec)
>Rows matched: 0  Changed: 0  Warnings: 0
>
>Can I get some insight as to what the problem might be?

The inexactness of floating point arithmetic.

---------------------------------------------------------------------
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