2014-10-04 - 2014-10-30之间的随机更新日期栏如何仅工作日和08.00 - 20.00?
2014-10-04 - 2014-10-30 random working-days and random time 8.00-20.00
MySQL中的
答案 0 :(得分:0)
SET @MIN = '2014-10-04 8:00:00';SET @MAX = '2014-10-30 20:00:00';SELECT TIMESTAMPADD(SECOND, FLOOR(RAND() * TIMESTAMPDIFF(SECOND, @MIN, @MAX)), @MIN);
您可以参考Stack