SQL · Schema and constraints

create table

Defines a table and its columns, types and constraints.

Syntax
create table name (…);

Example

Open in the lab

More in this group

alter table check create unique index default drop table foreign key index not null

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course