SQL Extensions   «Prev 

CREATE TABLE syntax

Create Table syntax

  1. User, User is the owner of the table. If you leave this off, the table is owned by the Oracle user that executes the CREATE TABLE command.
  2. column_name , Column_name is the name of the column.
  3. Datatype, Datatype is any one of the valid Oracle datatypes, including NUMBER, VARCHAR2 (variable character), DATE, LONG, and BLOB (Large binary object). Some of these require additional parameters and some do not.
  4. Expression, Expression is some value that is the default value for the column (optional).
  5. Column_constraint , COLUMN_CONSTRAINT can be one or more of these: NULL, NOT NULL, PRIMARY KEY, CHECK ondition.
  6. If you have more than one column in the table, place a comma in front of the second column definition and all the following columns. Enclose the entire set of columns with parentheses.