SnowPro Advanced: Architect — Question 110

Instead of updating a particular row, a user forgot to put in the where clause and accidentally updated the entire table, named customer.

The variable error_update_query_id is set to query_id for the mistaken update statement.

How can the current version of the table customer be preserved into the table CUSTOMER_ERROR, and the table CUSTOMER be restored to the version that was in place prior to the update?

Answer options

Correct answer: D

Explanation

The correct answer, D, effectively creates a new table CUSTOMER_ERROR that captures the state of the CUSTOMER table before the erroneous update using a SELECT statement. Options A, B, and C are incorrect as they either misuse the command structure or do not accurately replicate the desired state of the table prior to the update.