DELETE (positioned) statement [ESQL] [SP]

Description

Deletes the data at the current location of a cursor.

Syntax

DELETE
WHERE CURRENT OF cursor-name

Parameters

cursor-name:

identifier | hostvar

Examples

Example 1

The following statement removes the current row from the database.

DELETE WHERE CURRENT OF cur_employee

Usage

This form of the DELETE statement deletes the current row of the specified cursor. The current row is defined to be the last row fetched from the cursor.

The positioned DELETE statement can be used on a cursor open on a view as long as the view is updatable.

Changes effected by positioned DELETE statements are visible in the cursor result set, except where client side caching prevents seeing these changes.

Standards

Permissions

Must have DELETE permission on tables used in the cursor.

See also