TOPIC 08/2815 MINNOT STARTED

SQL (Structured Query Language) CRUD (create, read, update, delete) for testers: INSERT, SELECT, UPDATE and DELETE

Almost every app action is one of four database actions. Learn the four SQL (Structured Query Language) statements and what each one should leave behind.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: a filing cabinet. You can put a new paper in, read a paper, correct a paper, or take a paper out. Those four moves cover the cabinet. A careful clerk checks the drawer before and after, and never empties the drawer by mistake.

Daily List is a to-do list app. Tom, the tester, learns the four moves and checks the drawer.

What it is: (create, read, ) operations are create, read, update and delete. In SQL (Structured Query Language) those moves are INSERT, SELECT, UPDATE and DELETE. A table is a grid, a row is one item, and a column is one fact about that item. INSERT and SELECT put a row in and read it back. UPDATE and DELETE change rows, and without WHERE they touch every row. DELETE is easy to mix up with TRUNCATE and DROP. DELETE removes chosen rows. DROP removes the table. TRUNCATE is a different statement, and SQLite does not have it.

Why it matters: One missing WHERE can mark every task done. Tom wants to see that blast on a practice copy, and he wants to undo it, before he trusts a cleanup script.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)

PLAIN WORDS · 2 in this section
empties
becomes empty, or drains into somewhere else
sqlite
a small free database tool

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Checking a filing cabinet before and after each move.

  1. Create
  2. Read
  3. Update
  4. Delete
Filing cabinet

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
Put in a paperINSERT
Read a paperSELECT
Correct a paperUPDATE
Tear up a paperDELETE

WHERE THIS PICTURE STOPS

  • A cabinet has one clerk, but data has many users.
  • A torn up paper is gone, but a soft delete keeps it.
  • A clerk sees the drawer, but a tester must read the table.

HOOK

Before, act, after.

TELL A FRIEND

A filing cabinet: four moves, check the drawer each time.

OFTEN MIXED UP WITH Looking at data with SQL SELECT. That topic reads data. This one adds the three statements that change it.

PRACTISE AND KEEP

Sources for this topic — 3 sources
  1. Market practice

    Create, read, update and delete (Wikipedia) ↗ — Wikipedia · Wikipedia: the four basic operations of persistent storage are create, read, update and delete, which map to the SQL statements INSERT, SELECT, UPDATE and DELETE (search excerpt, page not opened)

    Describes the four basic operations of persistent storage, create, read, update and delete, and how they map to the SQL (Structured Query Language) statements INSERT, SELECT, UPDATE and DELETE. Encyclopedia article. Not a standard. · Checked 2026-10-31

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Implementation-specific

    PostgreSQL documentation ↗ — The PostgreSQL Global Development Group · PostgreSQL 18 official manual, opened 2026-11-06: tutorial-transactions, sql-update, sql-delete and SQLite transaction reference. Supports only PostgreSQL behavior; earlier execution evidence remains separately versioned.

    A free, precise, section-numbered description of the SQL a payments practitioner actually writes. Join types and what happens to unmatched rows, GROUP BY and HAVING against WHERE, window functions and the de-duplication and running-total idioms built on them. Transaction isolation levels and the anomalies each permits, index use, and null three-valued logic.

    Used here for the data-and-SQL questions a Payment Operations Analyst, a Production Support Analyst and a Sanctions Screening Analyst are asked. · Checked 2026-08-18

    An implementation, not the standard — which is the point. ISO/IEC 9075-2 is paywalled, and this documents the same constructs in text anybody can open. Its isolation-level chapter attributes to the standard explicitly, so it can carry a standard-level claim as long as the citation says which document it is quoting.

    Cited as market practice rather than an official standard by kind: an engine's manual is authoritative about that engine and is not the obligation. Where a question turns on behaviour PostgreSQL chose rather than behaviour SQL requires, the answer has to say so.

    One correction carried here because it circulates widely: the sentence "The fundamental difference between WHERE and HAVING…", quoted all over the internet as PostgreSQL documentation, is not in the current documentation. It was searched for in the source tree and is not there.

    Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.

    Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.

    Read from the postgres/postgres documentation source tree (doc/src/sgml), which the project itself maintains and which carries the section ids the published URLs are derived from — so a cited section id can be checked against the rendered page.

  3. Implementation-specific

    SQLite official documentation — constraints, types and transactions ↗ — SQLite · SQLite rolling official documentation, opened 2026-11-06: foreignkeys.html, datatype3.html, lang_createtable.html, lang_transaction.html, isolation.html, cli.html, series.html and lang_createtrigger.html as relevant. Historical SQLite 3.40.1 results remain distinct from in-memory audit witnesses on 3.53.1.

    Implementation-specific SQLite documentation, not a universal SQL standard. Includes foreign-key enforcement, type affinity, CREATE TABLE/TRIGGER, explicit/implicit transaction behavior, isolation, CLI and series extension references. · Checked 2026-11-06

    Relevant primary pages opened 6 November2026; rolling documentation and CLI examples (3.54.0) are distinct from historical lesson runs3.40.1 and audit witnesses3.53.1. No file/connected database audit execution.

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.