具体的解决办法 为 1 数据不多的情况下,清空表,重新设计字段,改为double 或者 decimal
2 数据巨大的情况下 可以使用
select * from `vip_guest` t where format(t.index_cou,1) =format(3.1,1)
我需要这样来查
select * from table where format(ID,4) =format(3.1000,4)
或者是
select * from table where format(ID,4) =format(3.1,4)
删除语句也要注意是下边这样写的(嘿嘿):
delete from table where format(ID,4) =format(3.1000,4)
或者
delete from table where format(ID,4) =format(3.1,4)
注意:精度不能超过6.否则出错.因为float类型最多允许精确到小数点后6位.
同样的
SELECT * FROM table WHERE concat(字段名,'')='12.1';这样应该是也可以查到的