CREATE TABLE

A DDL statement that creates a table with its columns, Data Types and Constraints.

sql
CREATE TABLE customer (
  customer_id INT AUTO_INCREMENT PRIMARY KEY,
  phone_number VARCHAR(20) NOT NULL
);

When to use

PS 02 Q2 implements the restaurant ERD as MySQL CREATE TABLE statements with data types, primary and foreign keys and constraints. PP 03 Q5 gives the author table to reason about.

See PS 02.

Appears in

No references yet.