Complete the code to update the salary of employees in the 'employees' table.
UPDATE employees SET salary = 5000 WHERE id = [1];
The WHERE clause specifies which rows to update. Here, id = 10 targets the employee with ID 10.
Complete the code to update the 'status' to 'active' for users with last login before 2023-01-01.
UPDATE users SET status = 'active' WHERE last_login < [1];
Dates in SQL must be in quotes and in the format 'YYYY-MM-DD'.
Fix the error in the UPDATE statement to change the 'price' to 19.99 for product with id 5.
UPDATE products SET price = [1] WHERE id = 5;
Numeric values like prices should not be in quotes in SQL.
Fill both blanks to update the 'quantity' to 100 for items where 'category' is 'books'.
UPDATE inventory SET [1] = 100 WHERE [2] = 'books';
The quantity column is updated, and the WHERE clause filters rows where category equals 'books'.
Fill all three blanks to update the 'status' to 'inactive' for users with 'last_login' before '2022-12-31' and 'role' equals 'guest'.
UPDATE users SET [1] = 'inactive' WHERE [2] < [3] AND role = 'guest';
The status column is updated. The WHERE clause filters users with last_login before the date '2022-12-31' and role 'guest'.