Reputation: 117
When I try to use this query
SELECT MIN(CAST(`field` as SIGNED))
The results end up being rounded. So instead of 7.56 that I should be getting I am getting 7. Any ideas?
Upvotes: 0
Views: 183
Reputation: 263713
because you are using SIGNED
, try DECIMAL
SELECT MIN(CAST(`field` as DECIMAL(10,4)))
Upvotes: 2