Posted on 2009-05-12 22:26
leekiang 阅读(269)
评论(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