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.
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
LSQL DELETE FROM APPLICATIONS WHERE UPDATE=DATE '2002‑02‑13'
Note that the data type definition precedes the literal date value.
LSQL DELETE FROM APPLICATIONS WHERE CURRENT OF STATDOWN
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |