我正在尝试更改具有如下表的 Derby 数据库:
CREATE TABLE sec_merch_categories (
category_id int NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
packageName VARCHAR(100) NOT NULL,
name VARCHAR(100) NOT NULL,
primary key(category_id)
);
我想将category_id
列更改为:
category_id int NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
我看到的唯一文档是IBM 的 DB2,它建议删除表达式,更改表的完整性,然后重新添加表达式。无论如何在德比这样做?
谢谢,
安德鲁