Mysql生产指定时间段随机日期函数
UPDATe basicsale_b2b2c.basic_customer
SET registerDate = (
from_unixtime(
unix_timestamp('2017-01-01') + floor(
rand() * (
unix_timestamp('2019-03-18') - unix_timestamp('2017-01-01') + 1
)
)
)
)
复制代码



