sql 随机取指定范围内的值
SELECT Fdatetime, CONVERT(datetime, CONVERT(char(10), Fdatetime, 120) + ' ' + CONVERT(char(12), time1), 20)
AS newdatetime, time1, DATEADD(mi, - FLOOR(RAND(ABS(CHECKSUM(NEWID()))) * 15), CONVERT(datetime,
CONVERT(char(10), Fdatetime, 120) + ' ' + CONVERT(char(12), time1), 20)) AS testDatetime
FROM test