DELETE

Delete rows from a table.

Syntax

{
    DELETE FROM table-name [ [ AS ] correlation-name ]
        [ WHERE Clause ]
}

Description

This form is called a searched delete, removes all rows identified by the table name and WHERE clause.

Statement dependency system

A searched delete statement depends on the table being updated, all of its conglomerates (indexes). A CREATE or DROP INDEX statement for the target table of a prepared searched delete statement invalidates the prepared searched delete statement.

Example

-- Delete rows from the CUSTOMERS table where the CID is equal to 10.
DELETE FROM TRADE.CUSTOMERS WHERE CID = 10;

-- Delete all rows from table T.
DELETE FROM T;