SQL (Structured Query Language) for BAs: INSERT, UPDATE and DELETE, read before you write
Analysts mostly read data, but sometimes change it. Learn what these statements do, why a missing WHERE is dangerous and how to ask for changes safely.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a shared recipe book. Reading the book leaves every page as it was. Writing in the book changes it for every cook who opens it later. You check the page, the line and who else uses that recipe before you cross a line out.
Daily List is a made-up to-do app (SYNTHETIC / TRAINING ONLY). Sam, the , is asked to close some old tasks. Nina, the , still uses the live list. Sam reads the rows before anyone writes.
What it is: (Structured Query Language) is a language for asking a database questions and for changing what it stores. A table is a grid. A row is one thing, such as one task. A column is one fact about that row, such as its status. INSERT, UPDATE and DELETE are the three statements that add a row, change a row and remove a row. You type them into a database program such as PostgreSQL, MySQL or SQLite. Their neighbour is SELECT, which only reads. A further neighbour of DELETE is TRUNCATE, which empties a whole table, and DROP, which removes the table itself.
Why it matters: This is . Without WHERE, UPDATE and DELETE change every row, including tasks Nina still needs. Sam does not type into the live database. He writes a safe data change request (A written request that says what to change, why, how many rows and how to undo it) and asks Leo, the developer, to run it on a test copy first.
A paper book has one cook at a time. A database can have many writers at once, so the check matters more.
PLAIN WORDS · 2 in this section
- sqlite
- a small free database tool
- empties
- becomes empty, or drains into somewhere else
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the work.
THE REAL JOB Editing a shared recipe book with care.
- Read
- Count
- Ask
HOW THE PICTURE MAPS
| In the picture | In the work |
|---|---|
| Reading | SELECT |
| Writing a line | INSERT or UPDATE |
| Crossing out | DELETE |
| A copy to put back | Old values |
WHERE THIS PICTURE STOPS
- A book has one copy, but data may have many users.
- You can erase a line, but a commit may be final.
- A recipe is read slowly, but a query runs at once.
HOOK
Read, count, ask.
TELL A FRIEND
A shared recipe book: read, check, then ask.
OFTEN MIXED UP WITH SQL for BAs: statement types, keys and constraints. That topic names the statement types. This one covers the risks of the ones that change data.
PRACTISE AND KEEP
Sources for this topic — 5 sources
- Market practice
SELECT command reference (PostgreSQL documentation) ↗ — PostgreSQL · PostgreSQL 18, SELECT: WHERE/HAVING/output aliases, functional dependence, NULL ordering and LIMIT; publisher page opened6November 2026. Dialect scope explicit.
PostgreSQL18 publisher documentation opened on6November2026: SELECT: WHERE/HAVING/output aliases, functional dependence, NULL ordering and LIMIT. No execution on PostgreSQL is claimed; engine-specific examples remain scoped to18.
- Market practice
SQLite: transactions ↗ — SQLite project · SQLite: transactions; Explicit versus implicit transactions and error-handling scope. Publisher page opened6November 2026.
Publisher documentation opened on6November2026. Engine/version scope is explicit; other database implementations may differ. Teaching queries are synthetic, not a required publisher template.
- Market practice
TRUNCATE (PostgreSQL documentation) ↗ — PostgreSQL Global Development Group · PostgreSQL 18, TRUNCATE transactional and locking behavior; publisher page opened6November 2026. Dialect scope explicit.
PostgreSQL18 publisher documentation opened on6November2026: TRUNCATE transactional and locking behavior. No execution on PostgreSQL is claimed; engine-specific examples remain scoped to18.
- Market practice
Statements that cause an implicit commit (MySQL reference manual) ↗ — Oracle / MySQL · MySQL 8.4 publisher manual opened6November 2026. §15.3.3 DDL statements that implicitly commit; no claim all database DDL behaves alike.
MySQL8.4 publisher manual opened6November2026. §15.3.3 DDL statements that implicitly commit; no claim all database DDL behaves alike.
- Simplified educational illustration
Payments Signal editorial teaching models — Payments Signal
What this simplifies: Daily List people, data and exercises are invented for teaching. Query results belong to the declared fixture and database version. Authorization, business identity, time bounds and unknown-value policy must be agreed in context; no universal mandatory query template is implied.
Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.