The same DELETE can remove several TRUE rows.

highlighted = computed this step

Multiple rows removed

A WHERE predicate can choose more than one row to remove.

many TRUE rows\text{many TRUE rows}

Remove open tasks

DELETE removes 2 rows and keeps 2 rows.

removed=2\text{removed}=2

DELETE examples are tiny finite row removals; SQL dialect completeness, joins in DELETE, subqueries, triggers, constraints, transactions, locks, indexes, optimizer behavior, performance, and product behavior are out of scope.

Multiple rows removed: base rowsidownerstatuspoints1Adaopen102Benopen203Cydone154DeeNULL5 WHERE chooses rowssourcevaluecompareTotruthremoved0openopenTRUEyes1openopenTRUEyes2doneopenFALSEno3NULLopenUNKNOWNno Rows removedsourcerowreason0(1, Ada, open, 10)WHERE_TRUE1(2, Ben, open, 20)WHERE_TRUE Rows after DELETEidownerstatuspoints3Cydone154DeeNULL5 DELETE factsfactvaluebaseRowCount4removedRowCount2keptRowCount2finalRowCount2whereUnknownCount1deleteStatusremoved_rowswhereKindeq

Read each removed row

Both open rows appear in the removed-rows table.

two rows removed\text{two rows removed}

Summary

Every TRUE row is removed, in source order.

all TRUE rows\text{all TRUE rows}