In MySQL, The UPDATE statement is used to modify existing records in a table.
UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition;
table_name: The name of the table you want to update.
SET: Specifies the columns you want to update along with their new values.
WHERE: Optional, specifies the condition that must be satisfied for the update to occur. If you omit the WHERE clause, all records in the table will be updated.
UPDATE products SET price = 2000 WHERE category = 'LAPTOP';
Note: In this example, the price of all products in the LAPTOP category is updated to 2000.
UPDATE students SET grade = 'A', status = 'Pass' WHERE score >= 90;
Note: This example updates the grade and status columns for students who scored 90 or above.