DELETE FROM statement

The DELETE FROM statement deletes rows from a table in an external database based on a search condition.

Syntax

A correlation name is created that you can use inside the search condition to refer to the values of columns in the table. This correlation name is either the name of the table (without the data source qualifier) or the explicit qualifier specified.

Example

If you have a Database node that has been configured with a connection to a table SHAREHOLDINGS, you can use the following statement to configure the Database node:
DELETE FROM Database.SHAREHOLDINGS AS H
 WHERE H.ACCOUNTNO = Body.AccountNumber;

This removes all rows from the SHAREHOLDINGS table where the ACCOUNTNO field in the table is equal to the AccountNumber in the message.

Handling database errors

For information about handling database errors, see Capturing database state.

Related concepts
ESQL

Related tasks
Developing ESQL

Related reference
Syntax preference
ESQL statements