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

 

相关文章:

  • 2022-01-14
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-07-11
  • 2021-09-26
猜你喜欢
  • 2021-11-29
  • 2021-11-29
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案