Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何生成随机时间戳并将其放入 var 中?
谢谢,
托马索
我找到了这个解决方案
start_date + dbms_random.value(0,86400*(end_date-start_time)+1)/86400
在
http://www.orafaq.com/forum/t/122604/2/
不确定为什么,但类似于以下伪代码:
在足够大的范围内找到一个随机数,然后将其添加或减去 SYSDATE。
我们在 oracle 中有随机数生成器……这个随机数可用于添加 sysdate 以获取随机日期……或时间戳。