DELETE Command
Marks records for deletion.
DELETE [Scope] [FOR lExpression1] [WHILE lExpression2] [IN nWorkArea | cTableAlias] [NOOPTIMIZE] |
Parameters
- Scope
-
Specifies a range of records to mark for deletion. The default scope for DELETE is the current record (NEXT 1). The scope clauses are: ALL, NEXT nRecords, RECORD nRecordNumber, and REST.
For more information on scope clauses, see Scope Clauses.
- FOR lExpression1
-
Specifies a condition whereby only the records that satisfy the logical condition lExpression1 are marked for deletion.
Rushmore Query Optimization optimizes a query created with DELETE ... FOR if lExpression1 is an optimizable expression and the table is indexed on DELETED( ). For best performance, use an optimizable expression in the FOR clause.
For information on Rushmore optimizable expressions, see SET OPTIMIZE Command, and Using Rushmore Query Optimization to Speed Data Access in Optimizing Applications.
- WHILE lExpression2
-
Specifies a condition whereby records are marked for deletion for as long as lExpression2 evaluates to true (.T.).
- IN nWorkArea
-
Specifies the work area of the table in which records are marked for deletion.
- IN cTableAlias
-
Specifies the alias of the table in which records are marked for deletion.
If you omit nWorkArea and cTableAlias, records are marked for deletion in the table in the currently selected work area.
- NOOPTIMIZE
-
Disables Rushmore optimization of DELETE.
Remarks
Example
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic