SnowPro Core Exam QuestionsBrowse all questions from this exam

SnowPro Core Exam - Question 656


A view is defined on a permanent table. A temporary table with the same name is created in the same schema as the referenced table.

What will the query from the view return?

Show Answer
Correct Answer: B

When a temporary table is created with the same name as a permanent table in the same schema, and a view is defined on the permanent table, the query from the view will return the data from the temporary table. This is because temporary tables take precedence in the session over permanent tables with the same name.

Discussion

5 comments
Sign in to comment
miomio123Option: B
Jul 7, 2024

Similar to the other table types (transient and permanent), temporary tables belong to a specified database and schema; however, because they are session-based, they aren’t bound by the same uniqueness requirements. This means you can create temporary and non-temporary tables with the same name within the same schema. However, note that the temporary table takes precedence in the session over any other table with the same name in the same schema. https://docs.snowflake.com/en/user-guide/tables-temp-transient

s_indira15Option: A
Feb 10, 2025

when a view is defined on a permanent table, it continues to reference the permanent table even if a temporary table with the same name is created in the same schema

MultiCloudIronManOption: B
Jul 7, 2024

Correct

MultiCloudIronMan
Dec 28, 2024

Changing my answer to A - According to the documentation, when a view is defined on a permanent table, it continues to reference the permanent table even if a temporary table with the same name is created in the same schema. The view will not be affected by the temporary table.

ravuri_rk
Jul 7, 2024

Coorrect B

JRayanOption: A
Feb 17, 2025

View contains query that references the perm table. so, when query is executed on the view, it will run the query definition on the view. So, 'A' is correct

JRayan
Feb 20, 2025

Sorry, B is the correct answer.