ALTER TABLE partitioning
15973 단어 partition
ALTER TABLE partitioning
Change the partition properties of an existing table.Syntax:
ALTER TABLE [schema.]table partitioning_clause [PARALLEL parallel_clause] [ENABLE enable_clause | DISABLE disable_clause] [{ENABLE|DISABLE} TABLE LOCK] [{ENABLE|DISABLE} ALL TRIGGERS]; partitioning_clause: ADD PARTITION partition --add Range ptn VALUES LESS THAN (value, value, [MAXVALUE],...) [partition_description] ADD PARTITION partition --add Hash ptn storage_options extent_options OVERFLOW storage_options extent_options COMPRESS | NOCOMPRESS LOB (LOB_item) STORE AS LOB_segname VARRAY varray STORE AS LOB_segname {UPDATE | INVALIDATE} GLOBAL INDEXES PARALLEL int | NOPARALLEL ADD PARTITION partition --add List ptn VALUES (DEFAULT | NULL | value [,…]) [partition_description] COALESCE PARTITION partition {UPDATE | INVALIDATE} GLOBAL INDEXES PARALLEL int | NOPARALLEL DROP [SUB]PARTITION partition {UPDATE | INVALIDATE} GLOBAL INDEXES PARALLEL int | NOPARALLEL MODIFY PARTITION partition storage_options extent_options OVERFLOW storage_options extent_options COMPRESS | NOCOMPRESS LOB (LOB_item) STORE AS LOB_segname VARRAY varray STORE AS LOB_segname ADD SUBPARTITION subpartition [VALUES (DEFAULT | NULL | value [,…])] TABLESPACE tablespace OVERFLOW [TABLESPACE tablespace] LOB (LOB_item) STORE AS LOB_segname VARRAY varray STORE AS LOB_segname [{UPDATE | INVALIDATE} GLOBAL INDEXES] [PARALLEL int | NOPARALLEL] COALESCE SUBPARTITION -- for HASH Partition [{UPDATE | INVALIDATE} GLOBAL INDEXES] [PARALLEL int | NOPARALLEL] MAPPING TABLE UPDATE BLOCK REFERENCES MAPPING TABLE ALLOCATE EXTENT [( [size int K | M ] [DATAFILE 'filename' ] [INSTANCE int] ) MAPPING TABLE DEALLOCATE UNUSED [KEEP int K | M ] {ADD | DROP} VALUES (partition_value,...) -- for List Partition [REBUILD] UNUSABLE LOCAL INDEXES MODIFY DEFAULT ATTRIBUTES [FOR PARTITION partition] storage_options [PCTTHRESHOLD int] [[NO]COMPRESS [int]] [overflow_clause] [LOB lob_item LOB_parameters][VARRAY varray LOB_parameters] MODIFY SUBPARTITION subpartion ALLOCATE EXTENT [( [size int K | M ] [DATAFILE 'filename' ] [INSTANCE int] ) DEALLOCATE UNUSED [KEEP int K | M ] {ADD | DROP} VALUES (partition_value,...) LOB (LOB_item) STORE AS LOB_segname VARRAY varray STORE AS LOB_segname {ADD | DROP} VALUES (partition_value,...) -- for List Partition [REBUILD] UNUSABLE LOCAL INDEXES MOVE PARTITION partition [MAPPING TABLE] storage_options [COMPRESS [int] | NOCOMPRESS] OVERFLOW storage_options LOB (LOB_item) STORE AS LOB_segname VARRAY varray STORE AS LOB_segname SUBPARTITIONS hash_subpartition_quantity [STORE IN (tablespace,...)] (SUBPARTITION subpartition [VALUES (DEFAULT | NULL | value,...)] TABLESPACE tablespace OVERFLOW [TABLESPACE tablespace] LOB (LOB_item) STORE AS LOB_segname VARRAY varray STORE AS LOB_segname ,SUBPARTITION...) {UPDATE | INVALIDATE} GLOBAL INDEXES {NOPARALLEL|PARALLEL int} MOVE SUBPARTITION subpartion [partition_description] VALUES (DEFAULT | NULL | value [,…]) TABLESPACE tablespace OVERFLOW [TABLESPACE tablespace] LOB (LOB_item) STORE AS LOB_segname VARRAY varray STORE AS LOB_segname {UPDATE | INVALIDATE} GLOBAL INDEXES {NOPARALLEL|PARALLEL int} RENAME [SUB]PARTITION ptn_name TO new_name TRUNCATE [SUB]PARTITION ptn_name {DROP|REUSE} STORAGE {UPDATE | INVALIDATE} GLOBAL INDEXES {NOPARALLEL|PARALLEL int} SET SUBPARTITION TEMPLATE (SUBPARTITION subpartition [VALUES (DEFAULT | NULL | value [,…])] TABLESPACE tablespace OVERFLOW [TABLESPACE tablespace] LOB (LOB_item) STORE AS LOB_segname VARRAY varray STORE AS LOB_segname ) SET SUBPARTITION TEMPLATE int --hash SubPartition quantity SPLIT PARTITION ptn_name AT (value, value...) INTO (ptn_spec, ptn_spec) {UPDATE | INVALIDATE} GLOBAL INDEXES {NOPARALLEL|PARALLEL int} SPLIT SUBPARTITION ptn_name VALUES (value, [NULL],value [,…]) INTO (ptn_spec, ptn_spec) {UPDATE | INVALIDATE} GLOBAL INDEXES {NOPARALLEL|PARALLEL int} MERGE PARTITIONS ptn_1, ptn_2 INTO PARTITION partition storage_options extent_options OVERFLOW storage_options extent_options COMPRESS | NOCOMPRESS LOB (LOB_item) STORE AS LOB_segname VARRAY varray STORE AS LOB_segname SUBPARTITIONS hash_subpartition_quantity [STORE IN (tablespace [,…])] (SUBPARTITION subpartition [VALUES (DEFAULT | NULL | value [,…])] TABLESPACE tablespace OVERFLOW [TABLESPACE tablespace] LOB (LOB_item) STORE AS LOB_segname VARRAY varray STORE AS LOB_segname ,SUBPARTITION...) {UPDATE | INVALIDATE} GLOBAL INDEXES {NOPARALLEL | PARALLEL int} MERGE SUBPARTITIONS subptn_1, subptn_2 INTO SUBPARTITION subpartition VALUES LESS THAN (value, value, [MAXVALUE] [,…]) TABLESPACE tablespace OVERFLOW [TABLESPACE tablespace] LOB (LOB_item) STORE AS LOB_segname VARRAY varray STORE AS LOB_segname ,SUBPARTITION... {UPDATE | INVALIDATE} GLOBAL INDEXES {NOPARALLEL | PARALLEL int} EXCHANGE [SUB]PARTITION [sub]partition WITH TABLE table {INCLUDING|EXCLUDING} INDEXES {WITH|WITHOUT} VALIDATION EXCEPTIONS INTO [schema.]table {UPDATE | INVALIDATE} GLOBAL INDEXES {NOPARALLEL|PARALLEL int}storage_options: PCTFREE int PCTUSED int INITTRANS int MAXTRANS int STORAGE storage_clause TABLESPACE tablespace {LOGGING|NOLOGGING}overflow_clause: OVERFLOW ALLOCATE EXTENT [( [size int K | M ] [DATAFILE 'filename' ] [INSTANCE int] )] OVERFLOW DEALLOCATE UNUSED [KEEP int K | M ] ADD OVERFLOW storage_options [(PARTITION storage_options [,PARTITION storage_options [,…]])]extent_options: ALLOCATE EXTENT [( [size int K | M ] [DATAFILE 'filename' ] [INSTANCE int] )] DEALLOCATE UNUSED [KEEP int K | M ]
Examples
Add a column to a table ALTER TABLE STAFF_OPTIONS ADD SO_INSURANCE_PROVIDER Varchar2(35);
Add a default value to a column ALTER TABLE STAFF_OPTIONS MODIFY SO_INSURANCE_PROVIDER Varchar2(35) DEFAULT 'ABC Ins';
Add two columns to a table and remove a constraint ALTER TABLE STAFF_OPTIONS ADD (SO_STAFF_ID INT, SO_PENSION_ID INT) STORAGE INITIAL 10 K NEXT 10 K MAXEXTENTS 121 PCTINCREASE 0 FREELISTS 2 DROP CONSTRAINT cons_SO;
"You're either part of the solution or part of the problem" - Eldridge Cleaver Related Commands:
ANALYZE TABLE COMPUTE STATISTICS ALTER INDEX ALTER VIEW COMMENT - Add a comment to a table or a column. RENAME DBMS_REDEFINITION Related Views:
DBA_ALL_TABLES ALL_ALL_TABLES USER_ALL_TABLES DBA_TABLES ALL_TABLES USER_TABLES TAB DBA_TAB_COLUMNS ALL_TAB_COLUMNS USER_TAB_COLUMNS DBA_TAB_PARTITIONS ALL_TAB_PARTITIONS USER_TAB_PARTITIONS DBA_PART_TABLES ALL_PART_TABLES USER_PART_TABLES<!--mce:0--> <!--mce:1--> <!--mce:2--> <!--mce:3--> <!--mce:4--> <!--mce:5-->
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Linux의 i-node, 파티션, 파일 시스템 및 마운트 복습2차 저장 장치 내의 파일의 실제 데이터 위치.↑ 파일 자체의 정보가 있는 곳. (즉, 여러 개의 파일 이름을 추가해도 모든 파일 이름이 가리키는 i-number는 같다) 디렉토리에는 파일 이름과 i-number에 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.