我试图用随机时间戳更新列的多行但是再次 所有行都使用相同的时间戳进行更新。
UPDATE RCBDBA.RCORD_REC S
SET R_TMSTMP= (
SELECT to_timestamp(sysdate-201)
+ (dbms_random.value(1,8))
+ (dbms_random.value(0,31))
+ (dbms_random.value(0,24)/24)
+ (dbms_random.value(0,1440)/1440)
+ (dbms_random.value(0,86400)/86400) AS ran
FROM dual)
WHERE S.WS_ID IN (
SELECT S.WS_ID
FROM RCBDBA.RCORD_REC S
WHERE S.R_TMSTMP IN TO_TIMESTAMP ((
SELECT scr.R_TMSTMP
FROM RCBDBA.RCORD_REC scr
GROUP BY scr.R_TMSTMP
HAVING COUNT(*) =177 )) )