Search code examples
snowflake-cloud-data-platformauto-incrementalter

disable/remove auto increment attribute in snowflake


the table i used is ,

create or replace table abc(id int autoincrement, name varchar,date_of_birth date, age number, ts timestamp_ntz);

I used the below query to remove auto increment attribute in snowflake

alter table abc modify id int

here i have redefined the column name without the auto increment attribute . it works fine in mysql workbench but it is not working in snowflake . is there is some other way to disable/remove auto increment attribute in snowflake?


Solution

  • "Drop default" is doing the trick:

    alter table abc alter id drop default;