備份表數(shù)據(jù): create table emp as select * from scott.emp
還原表數(shù)據(jù):insert into emp select * from scott.emp
生成批量測試數(shù)據(jù)
create table myTestTable 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;
|