CREATE TABLE

The SQL statement that defines a new table: its name, columns, types and constraints.

In more detail

Everything that should always be true of the data, such as keys, NOT NULL, CHECK and foreign keys, is declared here. The same statement is standard enough to run nearly unchanged on SQLite and PostgreSQL, apart from type names and extras like STRICT.

Related terms

Taught in

References