CREATE TABLE

Create a table.

Syntax:

   CREATE [GLOBAL TEMPORARY] TABLE [schema.]table (tbl_defs,...)
      [ON COMMIT {DELETE|PRESERVE} ROWS]
          [storage_options | CLUSTER cluster_name (col1, col2,... )
             | ORGANIZATION {HEAP [storage_options] | INDEX idx_organized_tbl_clause}]
                [LOB_storage_clause][varray_clause][nested_storage_clause]
                    partitioning_options
                       [[NO]CACHE] [[NO]MONITORING] [PARALLEL parallel_clause]
                          [ENABLE enable_clause | DISABLE disable_clause]
                              [AS subquery]

tbl_defs:
   column datatype [DEFAULT expr] [column_constraint(s)]
   table_constraint
   table_ref_constraint

storage_options:
   PCTFREE int
   PCTUSED int
   INITTRANS int
   MAXTRANS int
   STORAGE storage_clause
   TABLESPACE tablespace
   [LOGGING|NOLOGGING]

idx_organized_tbl_clause:
   storage_option(s) [PCTTHRESHOLD int]
     [COMPRESS int|NOCOMPRESS]
         [ [INCLUDING column_name] OVERFLOW [storage_option(s)] ]

nested_storage_clause:
   NESTED TABLE nested_item STORE AS storage_table
      [RETURN AS {LOCATOR|VALUE} ]

partitioning_options:
   Partition_clause {ENABLE|DISABLE} ROW MOVEMENT

Missing from this page are the options for creating OBJECT TABLES - see the Oracle docs for this.

"Make everything as simple as possible, but not simpler." - Albert Einstein


Related Commands:

ALTER INDEX
ALTER VIEW

Related Views:

  DBA_ALL_TABLES       ALL_ALL_TABLES       USER_ALL_TABLES
  DBA_TABLES           ALL_TABLES           USER_TABLES         TAB



Back to the Top

Simon Sheppard
SS64.com