update (core)

Changes data in existing rows of the referenced table (dynamic event).

Syntax

Transact-SQL Syntax

update [[database.]owner.]{table_name | view_name}
 set column_name1 = ?
 [, column_name2 = ?]...
 [ where column_name relop ?
 [ {AND | OR} column_name relop ? ...]]

Parameters

Examples

Usage

  • You can substitute table_name and view_name with any valid object in the catalog.

  • Adaptive Server/CIS issues a dynamic update request if it does not need to examine any column data to fulfill the client request, subject to these conditions:
    • Only one table is involved in the update statement.

    • The statement does not contain built-in functions in its where clause.

    • A column name is not referenced to the right of any set expression.

  • These relational operators (relops) are supported in search conditions:

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

  • Adaptive Server/CIS passes the update command to DirectConnect as this series of dynamic requests:
    • prepare (define parameter formats)
    • execute (define parameter data)
    • deallocate
  • Upon completion of the update command, the number of rows affected must be indicated.

  • ODBC does not support a from clause in the update statement. The access service ignores the from clause.