O'Reilly logo

Oracle SQL: the Essential Reference by 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

CREATE/ALTER/DROP TABLE
						
						
						CREATE [GLOBAL] [TEMPORARY] TABLE [schema.]tablename  
  (column
						datatype [DEFAULT expression] [Column_Contraint] 
   [,column
						datatype [DEFAULT expression] [Column_Contraint]]...)
 [Table_Constraint_Clause]
 [Physical_Attributes_Clause]
 [TABLESPACE tablespace]   
 [STORAGE Storage_Clause]
 [LOGGING | NOLOGGING]
 [CLUSTER (column[,column ...])]
 [{ORGANIZATION HEAP  
    [Physical_Attributes_Clause]
    [TABLESPACE tablespace]   
    [STORAGE Storage_Clause]
    [LOGGING | NOLOGGING] |
   ORGANIZATION INDEX  
    [PCTTHRESHOLD integer]
    [COMPRESS integer | NOCOMPRESS]
    [Physical_Attributes_Clause]
    [TABLESPACE tablespace]   
    [STORAGE Storage_Clause]
    [LOGGING | NOLOGGING]
    [[INCLUDING column] OVERFLOW
      [Physical_Attributes_Clause]
      [TABLESPACE tablespace]   
      [STORAGE Storage_Clause]
      [LOGGING | NOLOGGING]
  }]
 [LOB {(lob_item[,lob_item ...]) STORE AS
        ([TABLESPACE tablespace]
         [{ENABLE | DISABLE} STORAGE IN ROW]
         [STORAGE Storage_Clause]
         [CHUNK integer]
         [PCTVERSION integer]
         [CACHE | NOCACHE [LOGGING | NOLOGGING]]
        )
       ) |
       (lob_item) STORE AS [(lob_segname)]
        [([TABLESPACE tablespace]
          [{ENABLE | DISABLE} STORAGE IN ROW]
          [STORAGE Storage_Clause]
          [CHUNK integer]
          [PCTVERSION integer]
          [CACHE | NOCACHE [LOGGING | NOLOGGING]]
       )]
      }
[Partition_Clause]
[ENABLE | DISABLE ROW MOVEMENT]
[CACHE | NOCACHE]
[MONITORING | NOMONITORING]
[PARALLEL integer | NOPARALLEL]
[ENABLE | DISABLE [VALIDATE | NOVALIDATE]]
   {UNIQUE (column[, column ...] | PRIMARY KEY | CONSTRAINT constraint_name}
   [USING INDEX   
   [TABLESPACE tablespace] 
   [Physical_Attributes_Clause ...

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