Name

ALTER TABLE

Synopsis

ALTER TABLE
[schema.]table_name
  {
[ADD (column
datatype [DEFAULT
expression]
[column_constraint_clause] )]
[MODIFY (column
[datatype] [DEFAULT
expression]
[column_constraint_clause] }]
   [PCTFREE integer]
   [PCTUSED integer]
   [INITRANS integer]
   [MAXTRANS integer]
   [LOGGING | NOLOGGING]
   [STORAGE (
      [NEXT integer[K | M] ]
      [MAXEXTENTS {integer | UNLIMITED} ]
      [PCTINCREASE integer]
      [FREELISTS integer]
      [FREELIST GROUPS integer] ]
      ) ]
   [DROP {
      PRIMARY KEY [CASCADE] |
UNIQUE
(column[,column...]
[CASCADE] |
CONSTRAINT constraint_name [CASCADE]} ]
[ALLOCATE EXTENT ([DATAFILE 'filename']
[SIZE integer[K | M] ]) ]
[DEALLOCATE UNUSED [KEEP integer[K | M]]
   [CACHE | NOCACHE]
   [RENAME TO table_name]
[PARALLEL ( {DEGREE {integer | DEFAULT} |
INSTANCES {integer | DEFAULT} } ) ]
   [NOPARALLEL]
   [DROP PARTITION partition]
   [TRUNCATE PARTITION partition]
[MODIFY PARTITION partition [REBUILD]
UNUSABLE LOCAL INDEXES]
[ADD PARTITION partition VALUES LESS THAN
(valuelist)
[RENAME PARTITION partition TO
newpartition]
[EXCHANGE PARTITION partition WITH
TABLE table_name
   [ {INCLUDING | EXCLUDING} INDEXES ]
   [ {WITH | WITHOUT} VALIDATION ] ]
  }
   [ENABLE
     {
      ALL TRIGGERS |
UNIQUE (column[,
column...] [CASCADE] |
      PRIMARY KEY [CASCADE] |
      CONSTRAINT constraint_name |
     }]
   [DISABLE
     {
      ALL TRIGGERS |
UNIQUE (column[,
column...] [CASCADE] |
      PRIMARY KEY [CASCADE] |
      CONSTRAINT constraint_name
     }]
  [ENABLE TABLE LOCK]
  [DISABLE TABLE LOCK]

Modifies the column characteristics of a table (table_name), the storage characteristics ...

Get Oracle Database Administration: The Essential Refe now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.