Delete (SQL)

In the database structured query language (SQL), the DELETE statement is used to remove one or more records from a table.

A subset may be defined for deletion using a condition, otherwise all records are removed.

Delete rows from table pies where column flavor equals Lemon Meringue: Delete rows in trees, if the value of height is smaller than 80.

The database only has three tables, person, address, and pa, with the following data: The pa table relates the person and address tables, showing that Joe, Bob and Ann all live at 2001 Main Street, but Joe also takes up residence on Pico Boulevard.

Some DBMS[clarification needed] offer a TRUNCATE TABLE command that works a lot quicker, as it only alters metadata and typically does not spend time enforcing constraints or firing triggers.