Chinaunix首页 | 论坛 | 博客
  • 博客访问: 396453
  • 博文数量: 88
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 1054
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-07 12:23
文章分类
文章存档

2014年(88)

我的朋友

分类: 数据库开发技术

2014-06-17 14:31:11

SQL> 
SQL> create table test_part(id number(10),name varchar2(100),cdate date)        
  2  partition by range(cdate)
  3  
SQL> 
SQL> create table test_part(id number(10),name varchar2(100))
  2  partition by range(id)
  3  (partition p1 values less than(10),
  4  partition p2 values less than(20),
  5  partition p3 values less than(30)
  6  );

Table created.

SQL> insert into test_part values(1,'aa');      

1 row created.

SQL> insert into test_part values(15,'bb');

1 row created.

SQL> insert into test_part values(25,'cc');

1 row created.

SQL> commit;

Commit complete.

SQL> update test_part set id=9 where id=15;
update test_part set id=9 where id=15
       *
ERROR at line 1:
ORA-14402: updating partition key column would cause a partition change


SQL> alter table test_part enable row movement;

Table altered.

SQL> update test_part set id=9 where id=15;

1 row updated.

SQL> commit;

Commit complete.

阅读(1342) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~