Day 3
The UPDATE Statement
The UPDATE statement is used to modify the value(s) in existing records in a table.
UPDATE employee
SET salary = 25000
WHERE salary IS NULL;
to Update multiple columns
UPDATE employee
SET salary = 45000,
gender = 'Female'
WHERE id = 1;
Update using multiple conditions
UPDATE employee
SET salary = salary + 3000
WHERE experience = 4
AND role = 'Developer';
UPDATE employee
SET department='IT'
WHERE department IS NUll;
UPDATE employee
SET salary = 30000
WHERE salary < 30000;


Top comments (0)