Snowflake snippets
Add a column to an existing table
Let’s say you have a CRITICAL_ORDERS
table with just two columns and you want to add another one.
SELECT *
FROM GLOBAL_SUPERSTORE.PUBLIC.CRITICAL_ORDERS
LIMIT 1;
![Snowflake snippet 22](static/img/CookBook/Snowflake/IMG_022.png)
You can use the following query
ALTER TABLE CRITICAL_ORDERS ADD COLUMN ACCOUNT_NAME TEXT DEFAULT '';
![Snowflake snippet 21](static/img/CookBook/Snowflake/IMG_021.png)
SELECT *
FROM GLOBAL_SUPERSTORE.PUBLIC.CRITICAL_ORDERS
LIMIT 1;
![Snowflake snippet 23](static/img/CookBook/Snowflake/IMG_023.png)