You dropped a table named sales_data in Snowflake. You want to recover it using the UNDROP command. Which of the following commands will successfully restore the table?
Think about the basic syntax to restore a dropped table without additional clauses.
The correct syntax to recover a dropped table is UNDROP TABLE <table_name>;. Options with IF EXISTS, REPLACE, or COPY are invalid in Snowflake's UNDROP command.
After dropping a table in Snowflake, how long is the dropped table available for recovery using UNDROP by default?
Think about the default data retention period Snowflake provides for dropped objects.
By default, Snowflake retains dropped tables for 7 days, allowing recovery with UNDROP within this period.
Which role or permission is required to successfully execute UNDROP on a dropped table in Snowflake?
Consider who controls the object or schema ownership in Snowflake.
To undrop an object, the user must have ownership on the dropped object or the schema it belonged to. Other roles or privileges alone are insufficient.
You dropped a schema named analytics that contained multiple tables and views. Which command will restore the entire schema and all its objects?
Think about the correct object type to undrop when recovering a schema.
The UNDROP SCHEMA <schema_name>; command restores the dropped schema and all its contained objects. The other options are invalid or refer to different object types.
You try to undrop a dropped table named customers, but a new table with the same name already exists in the schema. What is the best way to recover the dropped table without losing data?
Consider how Snowflake handles object name conflicts during undrop.
Snowflake does not support undropping an object if another object with the same name exists. The best practice is to rename or drop the existing object first, then undrop the dropped object.