首页 > 其他 > 详细

达梦普通表转成分区表

时间:2020-03-21 22:32:15      阅读:107      评论:0      收藏:0      [点我收藏+]
1.创建测试表:
SQL> create table test (id int,name varchar(20));
SQL> begin
for i in 1..10000 loop
insert into test values (i,‘aa‘||i);
commit;
end loop;
end;
/

2.导出数据:
[dmdba@localhost ~]$ dexp sysdba/SYSDBA file=/dm7/test.dmp tables=test

3.删除非分区表:
SQL> drop table test;

4.创建分区表:
create table test (
id int,
name varchar(20)
)
partition by range (id)(
partition p1 values less than (200),
partition p2 values less than (400),
partition p3 values less than (600),
partition p4 values less than (maxvalue) ) ;

5.导入数据:
[dmdba@localhost ~]$ dimp sysdba/SYSDBA file=/dm7/test.dmp tables=test ignore=y

达梦普通表转成分区表

原文:https://blog.51cto.com/alanfree/2480732

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!