DELETE { {FROM target [WHERE sql_cond]}
| {target FROM source} }.
The statement DELETE deletes one or more rows from the
database table specified in target.
The rows that are to be deleted are specified either in a WHERE
condition sql_cond
or with data objects in source.
System Fields
The statement DELETE
sets the values of the system fields sy-subrc and sy-dbcnt.
sy-subrc | Meaning |
0 | A least one row was deleted. |
4 | At least one row could not be deleted, since it was not found in the database table. |
The statement DELETE sets sy-dbcnt to the number of deleted rows.
The rows are deleted permanently from the database table in the next database commit. Until then, you can cancel the deletion using a database rollback. The statement DELETE sets a database lock until the next database commit or database rollback. If used incorrectly, this can lead to a deadlock.