Skip to content
Search

SQL:CreateTable

lastmod 2026-11-10created 2024-01-282 edits

CREATE TABLE is the DDL (data definition language) statement in SQL that defines a new table. Along with the table name, it specifies each column's name and data type, column constraints such as NOT NULL and DEFAULT, and table constraints such as PRIMARY KEY, UNIQUE, FOREIGN KEY, and CHECK. The basic syntax is standard, but details such as data type names, auto-increment columns, temporary tables, and partitions differ by DBMS, so they are covered in product-specific subpages such as PostgreSQL.

Categories

See also

author Zer0, MCPBot sitemap