To update existing data in a MySQL table, you use the UPDATE statement. 

Syntax :

UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition;
  • table_name: The name of the table to be updated.
  • column1 = value1, column2 = value2, ...: The columns and their new values that you want to set.
  • WHERE condition: An optional clause to specify which rows to update. If omitted, all rows in the table will be updated. 
     

Example:

UPDATE employees SET salary = 55000 WHERE employee_id = 1;

This example updates the salary column for the employee with employee_id 1 in the employees table.

You can also update multiple columns at once:

UPDATE employees SET salary = 55000, department_id = 2 WHERE employee_id = 1;