Scott Gifford wrote:

>>select * from price where amount = 3.45 // doesn't work

> Floating point numbers are very rarely equal, because of small
> rounding errors that happen all the time.  Probably the actual number
> in the database is something like '3.44000000000000001'.
> 
> Try something like this:
> 
>    select * from price where amount > 3.44 and amount <= 3.46

Or maybe             ... where ROUND(amount,2) = 3.45;

-- 
Hassan Schroeder ----------------------------- [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                          dream.  code.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to