Changing a column name in DB2

I need to rename the column name of one of the tables. I have a DB2 database and we are the database of connections to the Eclipse IDE and execute sql queries.

thank

+5
source share
1 answer

Use the ALTER TABLE statement.

ALTER TABLE G31.TG31PDIX RENAME COLUMN RECORD_KEY TO RECORD_KEYY;

This will only work if you are using a version of DB2 that supports this feature. The old version may be unsuccessful. I'm not sure when they added it, but that was after 2004.

+7
source

All Articles