update (core)

Description

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

set

specifies the column name and assigns the new value. The value is passed as a parameter.

relop

is a relational operation.

Examples

Example 1

update authors 
 set au_lname = ?
 where au_id = ?

The au_lname column is set to the value of <parameter 1> where the value of au_id is equal to the value of <parameter 2>.

Usage