DB2 400 drop column

后端 未结 6 1864
北荒
北荒 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:49

    According to this post: http://bytes.com/topic/db2/answers/185467-drop-column-table

    It is possible to drop a column using STRSQL in the green screen environment. I have access to this and it does work, but a client with a 400 does not have the licensed program to use STRSQL. The issue is that STRSQL will prompt if this is something I really want to do.

    To get at the data I'm using SQuirrel SQL client with the JT400 JDBC driver... So I guess with the system insisting on prompting (and actually no way of getting the prompt even without STRSQL) it won't let me do it.

    So I guess I'm stuck doing what I'm doing... creating a new table and copying the data and then swapping the tables.

提交回复
热议问题