sql随机时间与随机数

update mto_post set author_id = floor(10+rand()*10)
update mto_post t
set
t.created = concat('2019-',floor(1+rand()*10),'-',floor(rand()*3), floor(1+rand()*3),' ', floor(10+rand()*10),':',floor(10+rand()*49),':',floor(10+rand()*49));

猜你喜欢

转载自www.cnblogs.com/michaelcnblogs/p/12735583.html