MySQL “greater than” condition sometimes returns row with equal value

前端 未结 3 855
夕颜
夕颜 2020-12-20 18:10

I\'m running into a baffling issue with a basic MySQL query.

This is my table:

id | rating
1  | 1317.17
2  | 1280.59
3  | 995.12
4  | 973.88
<         


        
3条回答
  •  星月不相逢
    2020-12-20 19:17

    @Hituptony is correct. Try this:

    SELECT * FROM (`users`) WHERE `rating` > 973.88
    

    SQL FIDDLE

提交回复
热议问题