The following statement statements for generating a disposable test strip 10w in the oracle, mainly used to distinguish test and truncate drop, delete, and the like characteristics of the scene index.
Syntax analysis: Generate 100,000 TestTable data into the new table (this table does not exist in advance) in the table has four columns, the first column rownum value, as a second time, third column 0-100. random number, the fourth as a 20-character string.
create table testtable 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 <= 100000;