
Ultimate access to all questions.
As a data engineer, you often need to manipulate and update data within Delta tables. Consider a scenario where you have a Delta table named my_table, which includes a column named age. Your task is to remove all rows from this table where the value in the age column is greater than 25. Which of the following code blocks will perform this operation and save the updated data back to the same Delta table?_
A
SELECT * FROM my_table WHERE age > 25;*_
B
UPDATE my_table WHERE age > 25;_
C
DELETE FROM my_table WHERE age > 25;_
D
UPDATE my_table WHERE age <= 25;_
E
DELETE FROM my_table WHERE age <= 25;_
Explanation:
The correct code block to remove rows where the value in column age is greater than 25 from the existing Delta table my_table and save the updated table is 'DELETE FROM my_table WHERE age > 25;'. The DELETE statement is used in SQL to remove existing records from a table based on a specified condition. Other options either retrieve or update data, but do not remove rows.