For example, the SQL query returns the amount (money) - 67889.87, i.e. 67889 rubles and 87 kopecks. To get the whole part, easy - use the floor :
select value, floor(value) from table t where t.id = ... How to get the fractional part as a whole, to return 87?
round(mod(value, 1) * 100). Post your comment as an answer? - Denis