Previous Topic: DECLARE CURSOR Statement

Next Topic: DROP TABLE Statement

DELETE FROM Statement

The DELETE FROM statement deletes one or more rows that meet the specified criteria on a SELECT clause. When using a cursor, DELETE FROM deletes the row currently being processed.

Syntax

LSQL DELETE FROM tablename [WHERE criteria]

Operand

Explanation

criteria

Search criteria. When using a cursor, the criteria on a WHERE clause must include CURRENT OF cursorname, which causes the function to be performed on the current row being processed in the cursorname operation. (See the example that follows.)

tablename

The name of the table from which you are deleting.

WARNING! If you use the DELETE FROM statement for a table and do not include a WHERE clause, all rows from the table are deleted. Use the DELETE FROM statement with extreme caution.

Notes:

Examples