Complete the code to update the salary of employees in the 'employees' table.
UPDATE employees SET salary = 50000 WHERE id = [1];
The WHERE clause requires the employee's id as a number, so 10 is correct.
Complete the code to update the status of orders where the order date is before 2023-01-01.
UPDATE orders SET status = 'shipped' WHERE order_date [1] '2023-01-01';
We want to update orders before 2023-01-01, so the operator should be <.
Fix the error in the code to update the quantity of products where the product name is 'Widget'.
UPDATE products SET quantity = 100 WHERE product_name = [1];
String values in SQL must be enclosed in single quotes, so 'Widget' is correct.
Fill both blanks to update the price of items where the category is 'Books'.
UPDATE items SET price = [1] WHERE category = [2];
The price is a number, so 19.99 is correct. The category is a string, so it needs single quotes: 'Books'.
Fill all three blanks to update the 'status' to 'active' for users with age greater than 30.
UPDATE users SET [1] = [2] WHERE [3] > 30;
We update the status column to the string 'active' for users whose age is greater than 30.