20 October 2018        Add to Favorites   Report

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.


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.


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

Also, See:

Read great educational content like this and a lot more ! Create my free account now 🎁