UNDROP DYNAMIC TABLE
statementsupportedTables, views, streams, sequencesRestores the most recent version of a dropped dynamic table.
Syntax
UNDROP DYNAMIC TABLE <name>
Parameters
| Name | Required | Description |
|---|---|---|
name | Specifies the identifier for the dynamic table to restore. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. For more information, see Identifier requirements. |
Usage notes
- To undrop a dynamic table, you must be using a role that has OWNERSHIP privilege on that dynamic table.
- If a table with the same name already exists, an error is returned.
- UNDROP relies on the Snowflake Time Travel feature. An object can be restored only if the object was deleted within the Data retention period. The default value is 24 hours.
Access control requirements
A role used to execute this operation must have the following privileges at a minimum: Privilege | Object | Notes OWNERSHIP | The dynamic table that you want to undrop. | Operating on an object in a schema requires at least one privilege on the parent database and at least one privilege on the parent schema. For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.