DB2 400 drop column

后端 未结 6 1872
北荒
北荒 2021-02-07 09:02

I want to drop a column called id which is an auto incrementing PK.

The SQL:

alter table \"CO88GT\".\"XGLCTL\" drop column id cascade;
         


        
6条回答
  •  执念已碎
    2021-02-07 09:47

    There isn't enough information in your error message to be sure, but dropping a primary key column is generally quite risky and the database correctly makes it difficult.

    You likely have a foreign key constraint involving that column.

    Don't drop the constraint and delete that column unless you're sure you know what you're doing.

提交回复
热议问题