django获取指定列的数据 model一般都是有多个属性的,但是很多时候我们又只需要查询特定的某一个,这个时候可以用到values和values_list [values()](https://docs.djangoproject.com/en/1.9/ref/models/querysets/#values) values()¶ values(*fields)¶ Returns a QuerySet that returns dictionaries, rather than model i…
mysql 将指定列的浮点数转化为整数: update A set B = cast(B as decimal(10,0)) -- 或者 update A 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;…