Databricks Certified Data Engineer Associate — Question 4

Which of the following code blocks will remove the rows where the value in column age is greater than 25 from the existing Delta table my_table and save the updated table?

Answer options

Correct answer: C

Explanation

The correct answer is C because the DELETE statement specifically removes rows that meet the condition, which in this case is having an age greater than 25. Option A just selects rows without modifying the table, B attempts to update without removing, while D and E incorrectly focus on retaining or deleting rows with ages less than or equal to 25.