使用sql函数 DATE_ADD()函数
DATE_ADD() 函数向日期添加指定的时间间隔。
语法
DATE_ADD(date,INTERVAL expr type)
date 参数是合法的日期表达式。expr 参数是您希望添加的时间间隔。
type 参数可 YEAR ,MONTH
例句update tw_sensors_history set request_date =DATE_ADD(request_date,INTERVAL -1 YEAR)
产生随机两位小数 SELECT round(RAND(),2)
改变随机值 :update tw_sensors_history set value1=7.578+round(RAND(),3) where code='281AD67F0300009E'