oracle自動增加表空間指定分區

-- Create table
create table testTable
(
  tjsj        DATE not null 
)tablespace  tablespace1


   PARTITION BY RANGE(TJSJ)
  INTERVAL (NUMTODSINTERVAL(1,'DAY'))  store in ( tablespace2
  (
  PARTITION p_20190101 values LESS THAN  (TO_DATE('2019-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'))   tablespace tablespace2
 );

 
-- Add comments to the columns 
comment on column testTable.tjsj
  is '時間 YYYYMMDD';
 
-- Create/Recreate primary, unique and foreign key constraints 
alter table testTable
  add constraint PK_xxxx primary key (TJSJ)
  using index 
  tablespace tablespace3
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章