sql语句限制小数点后后两位,sql语句字符拼接

其中参数2表示保留两位有效数字,但是只负责四舍五入到两位小数,但是不负责截断

            Round(number,2)

select round(avg(win_rate),2) pjs from win_rate where miner_id="f030203" and createtime>= now( ) - interval 8 DAY;

 

 

拼接

concat("值1","值2")

select concat(round(avg(win_rate),2),"%") pjs from win_rate where miner_id="f030203" and createtime>= now( ) - interval 8 DAY;

sql语句限制小数点后后两位,sql语句字符拼接

 

sql语句限制小数点后后两位,sql语句字符拼接

上一篇:Oss文件存储


下一篇:vue深入相应式原理