DELETE

DELETE — delete rows from a table

Syntax

DELETE FROM [schema].table_name 
    [ WHERE condition ]
    [ ORDER BY { order_list [ COLLATE collation_name ] [ ASC | DESC] } [, ...] ]
    [ LIMIT count ]

Syntax using JOIN

Also see DELETE

DELETE FROM [schema].table_name 
    [ WHERE condition ]
    [ ORDER BY { order_list [ COLLATE collation_name ] [ ASC | DESC] } [, ...] ]
    [ LIMIT count ]
            [<join-specification>]

Description

DELETE removes rows from the specified table as specified by the WHERE clause. If the WHERE clause is absent, the effect is to delete all rows in the table. The result is a valid but empty table.

The user:

If the ORDER BY clause is specified, the rows are deleted in the specified order. If the ORDER BY is not given, the rows are deleted in whatever order the system finds fastest to achieve. Use the keyword COLLATE to change the character classification behavior of the sort order.
If the LIMIT clause is specified, a subset of rows will be deleted.

Parameters

Examples