SQL Tutorial: UPDATE

The SQL UPDATE query is used to modify the existing records in a table. You can combine with the WHERE clause in the query to update the selected rows

Syntax

UPDATE table_name
SET column1 = value1, column2 = value2....,
WHERE [condition]

For Example:

update Products set UnitPrice = 18.5
where ProductID = 1

You can update all records

update Products set UnitPrice = 18.5

 

Related Posts