delete (language command)

Description

Using a language command, delete removes a row from a table.

Syntax

delete [from] [[database.]owner.]{table_name|view_name}
 	[where search_conditions]
delete [[database.]owner.]{table_name | view_name}
 	[from [[database.]owner.]{table_name | view_name}
 	[, [[database.]owner.]{table_name | view_name}]...]
 	[where search_conditions]

Parameters

from (after delete)

is an optional keyword used for compatibility with other versions of SQL. Follow it with the name of the table or view from which you want to remove rows.

from (after table_name or view_name)

allows you to name more than one table or view to use with a where clause when specifying the rows to delete. The from clause allows you to delete rows from one table based on data stored in other tables, giving you much of the power of an embedded select statement.

where

is a standard where clause.

search_conditions

is a valid where clause component. It sets the conditions for the rows that are retrieved. A search condition can include column names, constants, joins, the keywords is null, is not null, or, like, and, or any combination.

Examples

Example 1

delete from authors
 where au_lname = “McBadden”

Usage