24 Dec 19 · KRISTIM · #Snowflake ·   Bookmark   ×

Update table definition in Snowflake

I have created a table in Snowflake... How do I update the name of a column, and then change the order of the columns? There are 3 total (for ex.  Good, Bad, Date)


posted on 24 Dec 19

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds

npackDec 25 06:09

Once you have created a table, you can use the alter table commands to modify the table structures, refer to Snowflake alter table command

However, you will not be able to modify the order of the columns or change a column name. You will have to drop and recreate if you want to change the order

Subbu-jan4Mar 12 01:51

Hi Naveen,

I am new to snow flake, started learning.

Is it possible drop table which has already data? First delete data then drop table ?

or directly we can drop it.

In this case how time travel works. for dropped  and re created tables with new definition.

npackMar 12 11:02

You can directly drop a table with drop table command. It will remove both data and structure

You can use undrop command to restore the table and back. Undrop will only work for 7 days. And undrop will not work if you created a new table with the same name

Community Software by Hittly