mysql生成随机时间戳

SELECT UNIX_TIMESTAMP(),UNIX_TIMESTAMP('20100101000000'),UNIX_TIMESTAMP()-UNIX_TIMESTAMP('20100101000000'),FROM_UNIXTIME(UNIX_TIMESTAMP('20100101000000')+ROUND(RAND()*(UNIX_TIMESTAMP()-UNIX_TIMESTAMP('20100101000000'))))

 

你可能感兴趣的:(mysql)