This maybe an easy one but i couldn't get answer. I need to select float value from tableexample table :-value10.24.54.64.06my querySELECT * FROM table where value = '4.6'returns empty result sethow can i solve this ! 解决方案 Use decimal instead of float.A decimal(10,2) will have 2 and only 2 decimal places and can be compared in the same manner as integers.Especially for monetairy values you should always use decimal, but anywhere where rounding errors are unwanted, decimal is a good choice.See: http://dev.mysql.com/doc/refman/5.1/en/precision-math-decimal-changes.htmlOrMySQL DECIMAL Data Type Characteristics 这篇关于MySQL的浮动数据不选择在WHERE子句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-29 02:39