Table of Contents

CREATE TABLE

Basic Syntax

CREATE TABLE tablename
(
  COLUMN  datatype  [NULL|NOT NULL]  [CONSTRAINTS],
  COLUMN  datatype  [NULL|NOT NULL]  [CONSTRAINTS],
  ...
);

Basic Example

CREATE TABLE Vendors
(
  vend_id       CHAR(10)     NOT NULL,
  vend_name     CHAR(50)     NOT NULL,
  vend_address  CHAR(50)     ,
  vend_city     CHAR(50)     ,
  vend_state    CHAR(5)      ,
  vend_zip      CHAR(10)     ,
  vend_country  CHAR(50)
);

from SELECT statement