delete (minimum)

Removes rows from a table (dynamic event).

Syntax

Transact-SQL Syntax

delete [[database.]owner.]{table_name | view_name}
 [where column_name relop ? {AND | OR} column_name relop ? ...]]

Parameters

Usage

  • Adaptive Server/CIS issues a dynamic delete request if it does not have to examine any column data to fulfill the client request. This is true when:
    • Only one table is involved in the delete statement.

    • The statement contains no built-in functions in its where clause.

  • Supported relational operators are:

    =, <>, <, >, <=, >=, LIKE.

  • Adaptive Server/CIS passes the dynamic delete command to DirectConnect as a series of dynamic requests:
    • prepare

    • define (parameter formats)

    • execute (with parameter data)

    • deallocate

  • The where clause is optional. It is provided by Adaptive Server/CIS if the original delete command contained one.

  • The prepare statement can execute multiple times before it is deallocated.

  • Upon completion of the delete command, the number of affected rows must be indicated.

  • Any valid object in the catalog can be substituted for table_name, view_name, and other variables.