Register | Login

Is it possible to rename a column name?

Posted by jyothsnav 2181 days ago (Editorial)

Yes it is possible to rename a column name in DB2 V9.7 version online.


Exception: If the column to be renamed is a part of primary key, we should drop the primary key, rename the column and then recreate the primary key


Command:


ALTER TABLE <TABNAME> RENAME COLUMN <OLDNAME> TO <NEWNAME>


 



Who Voted for this Article



YourWiz.com, is a website that will allow everyone to share their knowledge, tip or information through community micro blogging.