Showing posts with label Rename existing table in db2. Show all posts
Showing posts with label Rename existing table in db2. Show all posts

Friday, August 21, 2015

Rename existing table in db2

Directly renaming table in db2 is difficult. Alternet approch to achieve the same is:

Create table <NewTableName> like <ExistingTableName>
--- It will create same table structure as of existing table

insert into <NewTableName> select * from <ExistingTableName>
--- It will insert all data what we had in existing one.