CRUD — Create, Read, Update, Delete — is the everyday work of SQL, mapped to four statements.
SQL CRUD Operations
SELECT, INSERT, UPDATE, DELETE — the everyday statements.
Tap or hover a part to learn more.
Query data.
SELECT reads rows: SELECT name FROM customers WHERE city='London' ORDER BY name; — WHERE filters, ORDER BY sorts. The command you'll use most.
Check your understanding
1. Which clause is essential with UPDATE and DELETE?
2. Which statement reads data?
Keep learning
The four statements
- SELECT (Read) —
SELECT name FROM customers WHERE city = 'London' ORDER BY name; - INSERT (Create) —
INSERT INTO customers (name, city) VALUES ('Ada', 'London'); - UPDATE (Update) —
UPDATE customers SET city = 'Leeds' WHERE id = 5; - DELETE (Delete) —
DELETE FROM customers WHERE id = 5;
The golden rule: always use a WHERE clause with UPDATE and DELETE — without it you change every row. Wrap risky changes in a transaction. SELECT is the one you'll use most, filtered with WHERE and sorted with ORDER BY.
