免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2335 | 回复: 3

How to add partition primary key to partition table? [复制链接]

论坛徽章:
0
发表于 2003-05-13 12:04 |显示全部楼层
I want to recreate normal table to partition tables for the data is very large. But I can't create or add partition primary key to a partition table. My table have only ONE column as PK and the partition key is defferent from index column. I add PK dierectly to the table but it's not partitioned. I only find so little meterial about it in metalink, and the meterial cant resole the problem. Pls help me.
Thanks!

论坛徽章:
0
发表于 2003-05-13 14:17 |显示全部楼层

How to add partition primary key to partition table?

create table test
(col1 number,col2 number, col3 varchar2(10))
partition by range (col1)
(partition part1 values less than (5000) tablespace users,
partition part2 values less than (10000) tablespace system);

alter table test
add (constraint test_pk primary key (col1)
using index local
(partition test_ind1 tablespace users,
partition test_ind2 tablespace system));


try it

论坛徽章:
0
发表于 2003-05-13 15:18 |显示全部楼层

How to add partition primary key to partition table?

meet error 14039. Btw, my table's partition key is defferent from primary key.

论坛徽章:
0
发表于 2003-05-13 15:34 |显示全部楼层

How to add partition primary key to partition table?

reslove it. but should create pk using two columns.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP