Get floating point numbers from a list

I am working with a table with a field amount

type DECIMAL(5,2)

. Column values

id  amount
1   9.00
2   1.83
3   7.01
4   8.00
5   99.85

      

I need to get columns with only non-zero after the decimal.

From the above list, I should get

id  amount
2   1.83
3   7.01
5   99.85

      

How do I write a query to get the result?

I am using MySql 5.6.

+3


source to share


1 answer


Just guess:



SELECT * 
from tblname 
where amount=FLOOR(amount)

      

+1


source







All Articles