SQL · Pattern 12 — Data Manipulation (DML)
UPDATE
UPDATE modifies existing rows.
Source data — Pattern 12: Data Manipulation (DML)
All queries run against the shared employees table (see schema.sql). This pattern introduces core Data Manipulation Language (DML) statements. Topic 79 introduces an employee_updates table to demonstrate the MERGE / UPSERT operation.


What it does
UPDATE modifies existing rows.
Problem
Increase IT employees' salary by 10%.
UPDATE employees
SET salary=salary*1.10
WHERE department_id=(SELECT department_id FROM departments WHERE
department_name='IT');
Result
