DELETE

Removes rows from a database table.

Syntax

DELETE FROM table-specification
   [ WHERE { condition | CURRENT OF cursor } ]

where table-specification is:

[dbname[@dbserver]:][owner.]table
  1. dbname identifies the database name.
  2. dbserver identifies the database server (INFORMIXSERVER).
  3. owner identifies the owner of the table, with optional double quotes.
  4. table is the name of the database table.
  5. condition is an SQL expression to select the rows to be deleted.
  6. cursor is the identifier of a database cursor.

Usage

The DELETE SQL statement can be used to delete one or more rows from the specified database table.

The dbname, dbserver and owner prefix of the table name should be avoided for maximum SQL portability.

If you do not specify the WHERE clause, all rows in the table will be deleted. No warning will be generated by the compiler.

For more details about the WHERE CURRENT OF clause, see Positioned updates/deletes.

MAIN
   DATABASE stock 
   DELETE FROM items WHERE name LIKE 'A%'
END MAIN