Add identity column to existing table in Snowflake?
问题 I have a table "MY_TABLE" in Snowflake that I would like to add an identity column to. I tried ALTER TABLE "MY_TABLE" ADD COLUMN primary_key int IDENTITY(1,1); But this returns SQL compilation error: Cannot add column 'PRIMARY_KEY' with non-constant default to non-empty table 'MY_TABLE'. Is this just not possible in snowflake? To try to get around this limitation, I tried to create a temp version of the table CREATE OR REPLACE TABLE "MY_TABLE_TEMP" LIKE "MY_TABLE" ALTER TABLE "MY_TABLE_TEMP"