O'Reilly logo

Oracle Database Administration: The Essential Refe by Brian Laskey, David C. Kreines

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required