Monday, October 19, 2009

Oracle: How to create random test data multiple rows easy


To create a table with 100,000 rows with random values just type:


create table tableName (columnName1 number, columnName2 number);

insert into tableName (select rownum, dbms_random.value(1,100)
                        from dual
                      connect by level <= 100000);


commit;

No comments:

Post a Comment