Reputation: 11798
In snowflake i have the following structure
DB1
-- schema1
-- schema2
-- table2
i want to create a copy of table2 in schema1
so i am thinking to do
CREATE or replace TABLE "SCHEMA1"."TABLE2_CLONE_FROM_SCHEMA1" CLONE "SCHEMA2"."TABLE2";
now i will see
DB1
-- schema1
-- table2_clone_from_schema1
-- schema2
-- table2
now if i delete table2 in schem2 will i loose table2_clone_from_schema1
Upvotes: 0
Views: 1458
Reputation: 10079
Nothing will happen. Your new table stays there. When a table is deleted, Snowflake keeps the micro-partitions of this table if they are used by any cloned tables.
Upvotes: 1