Posted on 2009-05-12 22:26
leekiang 閱讀(273)
評論(0) 編輯 收藏 所屬分類:
oracle
1,create table tbA as select * from tbB
? 這樣會丟失索引等信息
2,生成10萬條測試記錄表可以用如下SQL:
?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;
來源:http://blog.csdn.net/yzsind/archive/2009/12/08/4967133.aspx