The UPDATE Statement

tags: #sql/basic_statements

The UPDATE statement is used to modify the existing records in a table.

The WHERE clause determines which and how many records will be updated.

An additional SET clause can be used to specify which attributes are to be modified and their new values.

UPDATE Syntax

UPDATE table_name
SET column1 = new_value1, column2 = new_value2, ...
WHERE condition;

Note: Be careful when updating records in a table! Notice the WHERE clause in the UPDATE statement. The WHERE clause specifies which record(s) that should be updated. If you omit the WHERE clause, all records in the table will be updated!

Powered by Forestry.md