CREATE TABLE

CREATE TABLE creates a table by declaring its columns, their types and their constraints. It is the basic statement for defining a relational schema. It is also where you specify the primary key and foreign keys. Once created, the table is filled with INSERT.

Example

CREATE TABLE clients (
  id integer PRIMARY KEY,
  nom text NOT NULL
);

Related concepts

The whole glossary