ITPub博客

exchange partition 的用法

原创 Linux操作系统 作者:paulyibinyi 时间:2007-12-11 16:39:22 0 删除 编辑
create table t1 as select sysdate dt,all_objects.* from all_objects;
create table t2 as select add_months(sysdate,-24) dt, all_objects.* from all_objects;

create table t( dt, OWNER, OBJECT_NAME, SUBOBJECT_NAME,

OBJECT_ID, DATA_OBJECT_ID, OBJECT_TYPE, CREATED,

LAST_DDL_TIME, TIMESTAMP, STATUS, TEMPORARY,

GENERATED, SECONDARY )

partition by range(dt) (

partition part2003 values less than ( to_date( '01-jan-2006',

'dd-mon-yyyy') ),

partition part2004 values less than ( to_date( '01-jan-2007',

'dd-mon-yyyy') ),

partition part2005 values less than ( to_date( '01-jan-2008',

'dd-mon-yyyy') )

)

as

select sysdate dt, all_objects.* from all_objects where 1=0;



alter table t

exchange partition part2003

with table t2 ;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7199859/viewspace-392/,如需转载,请注明出处,否则将追究法律责任。

上一篇: dataguard step by step
请登录后发表评论 登录
全部评论
oracle 10g ocm oracle 10g/11g/12c ocp aix 6.1 administrator,ogg expert,ITSS 技术交流群 201703254 微信公众号 paulyibin 探讨技术,开心工作 电话 13719354869 ,深入研究数据库和开始研究big data

注册时间:2007-12-11

  • 博文量
    905
  • 访问量
    6484344