Check for equality on a MySQL Float field

后端 未结 5 1559
失恋的感觉
失恋的感觉 2021-02-12 16:00

I have a Joomla system and I\'m trying to change the search so that it correctly finds floating point values in the database.

So, I have a query that is built at runtime

5条回答
  •  臣服心动
    2021-02-12 16:34

    I know these is an old post but if you don't want a precise comparison just use LIKE or NOT LIKE :

    select 'column1'
    from 'some_table'
    where 'some_float_field' NOT LIKE '2.18'
    

提交回复
热议问题