I am working with a table having amount
field of type DECIMAL(5,2)
. The values in the column are
id amount
1 9.00
2 1.83
3 7.01
4 8.00
5 99.85
I have to get the columns with only that have nonzero after decimal.
From the above list i should get
id amount
2 1.83
3 7.01
5 99.85
How should i write the query to get the result?
I am using MySql 5.6.
Just a guess:
SELECT *
from tblname
where amount=FLOOR(amount)
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加