--把时间转换成秒 select DATEDIFF(second, '00:00:00', '17:41:38') --取79到100之间的随机整数 select round(rand()*21+79,0)