当前位置:Gxlcms > 数据库问题 > mysql 将指定列的浮点数转化为整数

mysql 将指定列的浮点数转化为整数

时间:2021-07-01 10:21:17 帮助过:4人阅读

update set B =  cast(B as decimal(10,0)) -- 或者update set B = round(B,0)

 

例如:update hdcloude01.t_a01_eltable set t_a01_eltable.BatteryDal =  round(t_a01_eltable.BatteryDal, 0) where t_a01_eltable.`BatteryDal`  is not null; 

mysql 将指定列的浮点数转化为整数

标签:

人气教程排行