IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can we rename a DB2 Table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srebba
Warnings : 1

New User


Joined: 26 Apr 2007
Posts: 37
Location: USA

PostPosted: Thu Jun 14, 2007 8:51 pm
Reply with quote

Hi,

Can we rename the table name. Eg. Table 'ABC'..... now i would like to give the name 'CGF' for some other purpose.
Please let me know


Thank you
Sree
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jun 14, 2007 11:20 pm
Reply with quote

Hello,

Create a new table with the name you want and after migrating the data to the new table, drop the old table.
Back to top
View user's profile Send private message
ricardoslee

New User


Joined: 14 Jun 2007
Posts: 2
Location: Sao Paulo

PostPosted: Thu Jun 14, 2007 11:36 pm
Reply with quote

Depending on the version you can use:

alter table OLDNAME rename NEWNAME

or something alike.

Look here:
http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/c0023297.htm
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top