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
            )
        )
    )
)

 效果如下

2017-06-08 11:55:38
2019-02-10 01:40:15
2017-05-31 20:34:18
2017-02-26 01:50:52

 

posted on 2019-03-18 14:03  减肥的小老斧  阅读(3410)  评论(0编辑  收藏  举报