I wanted to get the maximum and minimum values of a field containing numbers in an SQL database, but when I did a
Code: Select all
SELECT max(value) FROM myTable
the maximum was: -9.2718491
and the minimum was -0.372839
Apart from being upside down, there were values in that table ranging downto -17.
[SOLUTION]
The "value" field was a VARCHAR and not a numeric type.