COF-C02 · Question #219
COF-C02 Question #219: Real Exam Question with Answer & Explanation
The correct answer is C: Recreate the view with the required changes. In Snowflake, to change the columns referenced in a view, the view must be recreated with the required changes. The ALTER VIEW command does not allow changing the definition of a view; it can only be used to rename a view, convert it to or from a secure view, or add, overwrite, o
Question
How can a user change which columns are referenced in a view?
Options
- AModify the columns in the underlying table
- BUse the ALTER VIEW command to update the view
- CRecreate the view with the required changes
- DMaterialize the view to perform the changes
Explanation
In Snowflake, to change the columns referenced in a view, the view must be recreated with the required changes. The ALTER VIEW command does not allow changing the definition of a view; it can only be used to rename a view, convert it to or from a secure view, or add, overwrite, or remove a comment for a view. Therefore, the correct approach is to drop the existing view and create a new one with the desired column references.
Topics
Community Discussion
No community discussion yet for this question.