I have a column in a MySQL database called price and of type FLOAT(8,2).
I then insert two rows into my table, one where price = 100.00 and one
where price = 100.01, and then try to find these rows:
query 1:
SELECT price
FROM table
WHERE price = 100.00
query 2:
SELECT price
FROM table
WHERE price = 100.01
query 1 successfully returns the row in question, while query 2 returns
the empty set. Using quotes around the search term does not affect it
at all (as it shouldn't since I "should" be searching a float...)
If I try to insert and then search for any number that does not end in
00, I get the empty set. I tried using LIKE and was able to find the
row, but there must be another way to test actual equality.
Thanks very much in advance.