Mirina Gonzales
Mirina Gonzales

Reputation: 23

Add a column to a view in snowflake

Is it possible to add a column to a view in snowflake or whenever I want to add a column I must recreate the view using

Create or replace view view_example as (
 Select * from customers
)

Thank you for your help!

Upvotes: 2

Views: 6585

Answers (1)

Felipe Hoffa
Felipe Hoffa

Reputation: 59165

Snowflake supports ALTER VIEW but the docs state that to change it's definition you have to DROP and re-create (or CREATE OR REPLACE as in the question).

Note that you cannot use this command to change the definition for a view. To change the view definition, you must drop the view and then recreate it.

https://docs.snowflake.com/en/sql-reference/sql/alter-view.html

Upvotes: 2

Related Questions