So I have a table called FLIGHT which contains 3 columns. The first and second hold various IDs relating to airports, and the third contains the distance between them. When I try and query the table with the following:
SELECT * from flight
WHERE distance =
(SELECT min(distance) from flight);
It returns two IDS and a value of ~ 100. However, when I export the whole table and look at it in Excel, I can see that the shortest distance is actually 11. It seems like the query selected the lowest 3-digit number, because when I try the following:
SELECT * from flight
WHERE distance < 100;
It returns 20+ records.
Does anybody have any idea of what might be going on?