Search code snippets, questions, articles...

UPDATE TABLE SQL query

UPDATE table_name 
SET
column_name1 = value1,
column_name2 = value2,
column_name3 = value3
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

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?
0 Comments