Name the table or view from which you want to delete. The table or view must be described in the CA Datacom Datadictionary, but must not be a CA Datacom Datadictionary table or a read-only view.
You can specify a 1- to 18-byte correlation-name to be used within the search-condition to designate the table or view. Also see Correlation Names and SQL Index Binding.
Introduces a condition that specifies what rows are to be deleted. You can omit the clause, give a search condition or name a cursor. If you omit the clause, all rows of the table or view are deleted.
Each column-name in the search condition must name a column of the table or view, and the table or view must not be referenced in the FROM clause of any subselect in the search condition. See Search Conditions for the search-condition syntax diagram.
Each column-name in the search condition which is not in a subquery must name a column of the table or view being updated. In subqueries, the table or view being updated must not be named in any FROM clause.
If the search condition contains a subquery, the subquery can be thought of as being executed each time the search condition is applied to a row. The result of the subquery is used in applying the search condition. In actuality, the subquery is executed for each row only if it contains a correlated reference to a column of the table or view.
Names a cursor that is defined in a DECLARE CURSOR statement of your program. The DECLARE CURSOR statement must appear in your program before the DELETE statement.
The table or view named must also be named in the FROM clause of the SELECT statement of the cursor. The result table of the cursor must not be read-only.
When the DELETE statement is executed, the cursor must be positioned on a row. This row is the one that is deleted. After the deletion, the cursor is positioned before the next row of its result table. If there is no next row, the cursor is positioned after the last row.
|
Copyright © 2014 CA.
All rights reserved.
|
|