码迷,mamicode.com
首页 > 数据库 > 详细

MySQL--指定浮点型数据的精确度TRUNCATE

时间:2017-02-06 16:00:03      阅读:270      评论:0      收藏:0      [点我收藏+]

标签:span   interval   tween   _id   style   pm2   class   node   back   

INSERT INTO perf_week(node_id,perf_time,pm25,pm10,temp,humi)
SELECT node_id,2016-12-08 11:55:00 AS perf_time,TRUNCATE(AVG(pm25),2) AS pm25,TRUNCATE(AVG(pm10),2) AS pm10,
TRUNCATE(AVG(curr_temp),2) AS temp,TRUNCATE(AVG(curr_humidity),2) AS humi FROM perf_pm25 WHERE perf_time BETWEEN DATE_SUB(2016-12-08 11:55:00,INTERVAL 1 WEEK) AND 2016-12-08 11:55:00 GROUP BY node_id;

啦啦啦

MySQL--指定浮点型数据的精确度TRUNCATE

标签:span   interval   tween   _id   style   pm2   class   node   back   

原文地址:http://www.cnblogs.com/ClassNotFoundException/p/6370539.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!