Previous Topic: DECLARE CURSOR StatementNext 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]

Parameters

criteria

Search the 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.

tablename

Name of the table from which you are deleting.

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

Notes:

Examples