Skip to content

UPDATE

UPDATE employees
SET salary = 4000
WHERE employeeId = 1;
Query OK, 1 row affected (0.04 sec)
Rows matched: 1 Changed: 1 Warnings: 0

In the example, the UPDATE command modifies the data of one row in the ‘employees’ table. The SET clause changes the ‘salary’ value to 4000 for the row where ‘employeeId’ equals 1. The output shows that the update operation was successful, one row was matched and affected, and no warnings were issued.