Suggest an editImprove this articleRefine the answer for “How do you update a record in a table?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)Updating an existing record in a table is done with the `UPDATE` command, e.g. `UPDATE Employees SET Age = 31, DepartmentID = 102 WHERE ID = 1;`. **Key point:** always use `WHERE`, to avoid accidentally changing every row - without it, every record in the table gets updated; one or several fields can be updated at once.Shown above the full answer for quick recall.Answer (EN)ImageUpdating an existing record in a table is done with the `UPDATE` command. **Syntax:** ```sql UPDATE Table_Name SET Field1 = Value1, Field2 = Value2, ... WHERE Condition; ``` **Example:** ```sql UPDATE Employees SET Age = 31, DepartmentID = 102 WHERE ID = 1; ``` **Explanation:** - `UPDATE Employees`, picks the table where we want to change data. - `SET Age = 31, DepartmentID = 102`, specifies which fields to update and to what values. - `WHERE ID = 1`, determines which specific record to change (without `WHERE`, every record in the table gets changed). ### Notes - Always use `WHERE`, so you don't accidentally change every row. - One or several fields can be updated at once. > Put simply, `UPDATE` is the SQL command for **changing data in existing records** of a table.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.