【问题标题】:disable/remove auto increment attribute in snowflake禁用/删除雪花中的自动增量属性
【发布时间】:2021-12-24 16:35:22
【问题描述】:

我用的表是,

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

我使用下面的查询来删除雪花中的自动增量属性

alter table abc modify id int

这里我重新定义了没有自动增量属性的列名。它在 mysql 工作台中工作正常,但在雪花中不起作用。 还有其他方法可以禁用/删除雪花中的自动增量属性吗?

【问题讨论】:

    标签: snowflake-cloud-data-platform auto-increment alter


    【解决方案1】:

    “删除默认值”可以解决问题:

    alter table abc alter id drop default;
    

    【讨论】:

      猜你喜欢
      • 2023-03-18
      • 1970-01-01
      • 1970-01-01
      • 2012-11-18
      • 2011-01-13
      • 2018-04-15
      • 2020-10-01
      相关资源
      最近更新 更多