UPDATE (SQL Statement)


Changes existing data in a table.


UPDATE  { table_name  | view_name }
SET { column_name = expression } [ ,n ]
[ FROM { table_name  | view_name } [ ,n ] ]
[ WHERE < search_condition > ]


UPDATE table1
SET c1 = 9


UPDATE permissions default to members of the sysadmin fixed server role, the db_owner and db_datawriter fixed database roles, and the table owner. Members of the sysadmindb_owner, and db_securityadmin roles, and the table owner can transfer permissions to other users.

SELECT permissions are also required for the table being updated if the UPDATE statement contains a WHERE clause, or if expression in the SET clause uses a column in the table.

Related Articles

SELECT (SQL Statement)

DELETE (SQL Statement)

INSERT (SQL Statement)