Collection Contents Index DELETE statement Next PDF

SQL Anywhere® Server - SQL Reference
  SQL Statements
DELETE (positioned) statement [ESQL] [SP]


Description

Use this statement to delete the data at the current location of a cursor.

Syntax

DELETE [ FROM table-spec ] WHERE CURRENT OF cursor-name

cursor-name : identifier | hostvar

table-spec : [ owner.]correlation-name

owner : identifier

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 table from which rows are deleted is determined as follows:

Permissions

Must have DELETE permission on tables used in the cursor.

Side effects

None.

See also
Standards and compatibility
Example

The following statement removes the current row from the database.

DELETE
WHERE CURRENT OF cur_employee;

Collection Contents Index DELETE statement Next PDF