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?
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?
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.
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
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
Correct
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.
Coorrect B
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
Sorry, B is the correct answer.