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

You can use the following query

ALTER TABLE CRITICAL_ORDERS ADD COLUMN ACCOUNT_NAME TEXT DEFAULT '';
Snowflake snippet 21

SELECT *
FROM GLOBAL_SUPERSTORE.PUBLIC.CRITICAL_ORDERS
LIMIT 1;
Snowflake snippet 23

Back to Snowflake cookbook page