SnowPro Core Exam QuestionsBrowse all questions from this exam

SnowPro Core Exam - Question 1171


What happens to foreign key constraints when a table is cloned to another database?

Show Answer
Correct Answer:

Discussion

4 comments
Sign in to comment
37ceea2Option: B
Feb 1, 2025

I changed my mind: https://docs.snowflake.com/en/user-guide/object-clone Cloning and foreign key constraints A table can have a foreign key constraint that references a table that includes the primary key. When a table with a foreign key constraint is cloned, the cloned table references the source or cloned table that includes the primary key: If the database or schema containing both tables is cloned, the cloned table with the foreign key references the primary key in the other cloned table. If the tables are in separate databases or schemas, the cloned table references the primary key in the source table. Hence, the answer is B, since the question does not mention that the both tables are cloned, within the same cloned database.

ViniJsrOption: B
Feb 21, 2025

If the database or schema containing both tables is cloned, the cloned table with the foreign key references the primary key in the other cloned table. If the tables are in separate databases or schemas, the cloned table references the primary key in the source table.

37ceea2Option: D
Jan 31, 2025

Master data is lost when cloning, except the micro-partitioning of the source table. But, the question is about foreign key. hence, even if the C is correct, the real answer is D.

ar_1510Option: B
Feb 4, 2025

Cloning and foreign key constraints A table can have a foreign key constraint that references a table that includes the primary key. When a table with a foreign key constraint is cloned, the cloned table references the source or cloned table that includes the primary key: If the database or schema containing both tables is cloned, the cloned table with the foreign key references the primary key in the other cloned table. If the tables are in separate databases or schemas, the cloned table references the primary key in the source table. https://docs.snowflake.com/en/user-guide/object-clone