Oracle随机生成大数据
Oracle随机插入大数据
话不多说,安排
示例:
-- 创建新表并批量插入五千万数据
create table TEST_TAB as
select rownum as id,
to_char(sysdate + ROWNUM/24/3600, 'yyyy-mm-dd hh24:mi:ss') as inc_datetime,
trunc(dbms_random.value(0, 100)) as random_id,
dbms_random.string('x', 20) random_string
from dual
connect by level <= 50;
字段分别为:ID、INC_DATETIME、RANDOM_ID、RANDOM_STRING
无论风雨,和自己一决胜负吧