I want to check whether the result is a decimal or an integer. So that it can be done in a manipulation or an existing function? For example:
select case when a/b = integer then 1 when a/b = decimal then 2 end from test
thanks.
You can do this too
SELECT
CASE
WHEN a % b = 0 THEN 1
ELSE 2
END AS result
FROM
test;