DELETED( ) Function

Example   See Also

Returns a logical value that indicates whether the current record is marked for deletion.

Syntax

DELETED([cTableAlias | nWorkArea])

Returns

Logical

Arguments

cTableAlias | nWorkArea

You can check the status of the current record in a table open in another work area by specifying the work area number with nWorkArea or the table alias with cTableAlias. If a table isn't open in the work area you specify, DELETED( ) returns false.

If you omit cTableAlias and nWorkArea, the deleted status is returned for the current record in the current work area.

Remarks

If the record is marked for deletion, DELETED( ) returns true (.T.); otherwise, DELETED( ) returns false (.F.).

Records can be marked for deletion with DELETE and DELETE – SQL, and they can be unmarked with RECALL.

Rushmore optimizes queries that test the deleted status of records if the table is indexed on DELETED( ).

For information on using Rushmore to optimize queries, see SET OPTIMIZE and "Understanding Rushmore Technology" in Chapter 15, Optimizing Applications, in the Programmer's Guide.