Creating Tables in SQL — a practical guide to SQL CREATE TABLE with clear examples you can reuse in real projects.
SQL Tutorial Series (14/100). Prefer one article? Read the complete SQL tutorial.
Short description
Design for current needs plus clear migration paths.
Create table
CREATE TABLE products (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(150) NOT NULL,
price DECIMAL(10,2) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);