I'm trying to do this:
SELECT CAST(columnName AS INT), moreColumns, etc
FROM myTable
WHERE ...
I've looked at the help FAQs here: http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html , it says I can do it like CAST(val AS TYPE)
, but it's not working.
Trying to convert a decimal to int, real value is 223.00 and I want 223
See Question&Answers more detail:os