快速提问;有没有办法在 select 语句上应用数字类型?
示例用法
select (t1.f_count / (select count(*) from utb where user_id = 1))*100 as ratio
我需要这个来返回 60 而不是 60.0000
最佳答案
尝试
select ROUND((t1.f_count / (select count(*) from utb where user_id = 1))*100) as ratio
关于mysql - SQL : return percentage without decimal place,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1395619/