Complete the code to delete all rows from the table named 'employees'.
DELETE FROM [1];The correct table name is 'employees'. Using the exact table name is important to delete the intended data.
Complete the code to delete only employees with the job title 'Intern'.
DELETE FROM employees WHERE job_title = [1];We want to delete only rows where the job_title is 'Intern'. The value must be in quotes because it is text.
Fix the error in the DELETE statement to remove employees hired before 2020.
DELETE FROM employees WHERE hire_date [1] '2020-01-01';
To delete employees hired before 2020, use the less than operator (<) comparing hire_date to '2020-01-01'.
Fill both blanks to delete employees from the 'sales' department hired after 2018.
DELETE FROM employees WHERE department = [1] AND hire_date [2] '2018-12-31';
We delete employees in the 'sales' department (text in quotes) hired after 2018 (use > operator).
Fill all three blanks to delete employees with salary less than 30000 and job title 'Assistant'.
DELETE FROM [1] WHERE salary [2] [3] AND job_title = 'Assistant';
We delete from 'employees' table where salary is less than 30000 and job title is 'Assistant'.