SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-109
DELETE Statement
DELETE Statement
Considerations for DELETE
MXCI Examples of DELETE
C Examples of DELETE
COBOL Examples of DELETE
Publish/Subscribe Examples of DELETE
The DELETE statement is a DML statement that deletes a row or rows from a table or
an updatable view. Deleting rows from a view deletes the rows from the table on which
the view is based. DELETE does not remove a table or view, even if you delete the last
row in the table or view.
The two forms of the DELETE statement are:
Searched DELETE—deletes rows whose selection depends on a search condition
Positioned DELETE—deletes a single row determined by the cursor position.
For the searched DELETE form, if there is no WHERE clause, all rows are deleted
from the table or view.
Use the positioned form of DELETE only in embedded SQL programs. Use the
searched form in MXCI or embedded SQL programs.
Searched DELETE is:
[ ROWSET FOR INPUT SIZE rowset-size-in ]
DELETE FROM table
| STREAM (table) [AFTER LAST ROW]
[SET ON ROLLBACK set-roll-clause [,set-roll-clause]...]
[WHERE search-condition | rowset-search-condition]
[[FOR] access-option ACCESS]
set-roll-clause is:
column-name = expression |
access-option is:
READ COMMITTED
| SERIALIZABLE
| REPEATABLE READ
| SKIP CONFLICT
Embed
Pub/Sub
Embed
Pub/Sub
Embed
Pub/Sub