
Answer-first summary for fast verification
Answer: The data from the temporary table.
The correct answer is B because Snowflake documentation clearly states that temporary tables take precedence over permanent tables with the same name within the same session. When a view is queried, Snowflake resolves object references at execution time, not at view creation time. Since the temporary table exists in the same schema with the same name, it will be used instead of the permanent table when the view query executes. This is supported by the community discussion where the highest upvoted comment (6 upvotes) references the official Snowflake documentation confirming temporary table precedence, and the overall community voting shows 70% support for answer B versus 30% for answer A.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A view is defined on a permanent table. A temporary table with the same name is then created in the same schema as the permanent table. What will a query against the view return?
A
The data from the permanent table.
B
The data from the temporary table.
C
An error stating that the view could not be compiled.
D
An error stating that the referenced object could not be uniquely identified.