The DELETE Query

The DELETE query uses the same join and selection syntax as the SELECT and UPDATE queries, but instead of retrieving records or updating the retrieved records, it deletes the selected records from the table or tables in the query. The simplest form of DELETE query deletes, from a single table, records that match a selection criterion. For example:

DELETE *
FROM Orders
WHERE Orders.OrderDate < #10/1/94#;
Multiple-Table DELETE Queries

A DELETE query can also be based on a multiple-table join. For example, the following sample query joins the Categories table to the Products table, and deletes records in the Products table that match the selection criterion specified for the Categories table:

DELETE Products.*
FROM Categories 
INNER JOIN Products 
ON Categories.CategoryID = Products.CategoryID
WHERE Categories.CategoryName = 'Beverages';

See Also For more information about DELETE queries, see the “Selecting Unique Records” section earlier in this chapter.