Changes existing rows by adding data or modifying existing data.
Transact-SQL Syntax
update [[database.]owner.]{table_name | view_name}
set [[[database.]owner.]{table_name. | view_name.}] column_name1 = {expression1 | NULL | (select_statement)} [, column_name2 = {expression2 | NULL | (select_statement)}]...
[from [[database.]owner.]{view_name | table_name
[(index index_name [prefetch size][lru | mru])]} [, [[database.]owner.]{view_name | table_name
[(index index_name [prefetch size][lru | mru])]}]...] [where search_conditions]
ODBC Syntax
UPDATE table_name
SET column_identifier={expression|NULL} [,column_idenfifier={expression|NULL}]...
[WHERE search_condition]
specifies the column name and assigns the new value. The value can be an expression or a NULL. More than one column name or value pair must be separated by commas.
is a standard where clause.
update authors set au_lname = “MacBadden” where au_lname = “McBadden”
Use update to change values in rows that have already been inserted. Use insert to add new rows.
You cannot update views defined with the distinct clause.
ODBC does not support a from clause in the update statement. The access service ignores the from clause.
select statements are not supported.
The “index” phrase is not supported.