MDA/MDD/TDD/DDD/DDDDDDD
posts - 536, comments - 111, trackbacks - 0, articles - 0
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

oracle处理数据的笔记

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

只有注册用户登录后才能发表评论。


网站导航: