sql

UPDATE TABLE SQL query

UPDATE table_name 
SET
column_name1 = value1,
column_name2 = value2,
column_name3 = value3

UPDATE TABLE query in SQL is used to update records of a table Columns. The above snippet will update all rows as there is not any condition provided in the query. If you want to update records based on the specific condition you can use WHERE clause as below query.

UPDATE table_name 
SET
column_name1 = value1,
column_name2 = value2,
column_name3 = value3
WHERE 
column_name = value
Was this helpful?