mysql保存字段小数点后两位小数

mysql保留字段小数点后两位小数用函数:truncate(s.price,2)即可。如果想用四舍五入的话用round(s.price,2)。

mysql保留字段小数点后两位小数
用函数:truncate(s.price,2)即可。
如果想用四舍五入的话用round(s.price,2)。