UNDROP DYNAMIC TABLE

Restores the most recent version of a dropped dynamic table.

See also:

CREATE DYNAMIC TABLE, ALTER DYNAMIC TABLE, DESCRIBE DYNAMIC TABLE, SHOW DYNAMIC TABLES, DROP DYNAMIC TABLE

Syntax

UNDROP DYNAMIC TABLE <name>
Copy

Parameters

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.

Examples

Restore the most recent version of a dropped table product:

UNDROP DYNAMIC TABLE product;
Copy
Language: English