CREATE TABLE CLONE Statement in Snowflake

Cloning creates a new table in snowflake (The underlying data is not copied over or duplicated) If you make any changes to the new table, the original table is unaffected by those changes.

Example:

create table mytable_copy CLONE mytable;

Creates a new table with the same column definitions and containing all the existing data from the source table, without actually copying the data.

Syntax:

CREATE [ OR REPLACE ] TABLE <name> CLONE <source_table>
[ { AT | BEFORE } { TIMESTAMP => <timestamp> | OFFSET => <time_difference> | STATEMENT => <id> } ]
[ COPY GRANTS ]

Also, See:

Ryan-Dallas

posted on 20 Oct 18

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds