
Explanation:
To retain only employees with a salary greater than 3000, it's necessary to remove those with salaries less than or equal to 3000. This is achieved using the DELETE statement with the appropriate condition: DELETE FROM table_name WHERE condition;. For more details, refer to the Databricks documentation.
Ultimate access to all questions.
The data engineering team has a Delta table called employees that contains the employees' personal information, including their gross salaries. Which of the following code blocks will ensure the table only retains employees with a salary greater than 3000?
A
SELECT CASE WHEN salary <= 3000 THEN DELETE ELSE UPDATE END FROM employees;
B
DELETE FROM employees WHERE salary <= 3000;
C
UPDATE employees WHERE salary > 3000 WHEN MATCHED SELECT;
D
DELETE FROM employees WHERE salary > 3000;
E
UPDATE employees WHERE salary <= 3000 WHEN MATCHED DELETE;
No comments yet.