If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Alter Table (change column name ) Problems

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-06-04, 00:39
carmenlei carmenlei is offline
Registered User
 
Join Date: Jun 2004
Posts: 24
Alter Table (change column name ) Problems

I want to use the DB2 control center to change the column name ( and data type either ) of a table. I have set the Privileges to Grand but when I open the alter table(change column) notebook. The column name and data type box were grey and I can't do anything on it? What can I do? And is there any SQL Statement which can finish this operation? THanks very much~~!!
Reply With Quote
  #2 (permalink)  
Old 07-06-04, 01:36
platho platho is offline
Registered User
 
Join Date: Dec 2002
Posts: 58
Hello,

Column names and datatypes can't be changed, except from a varchar which can change in length. To achieve this, you can generate the DDL for the table, change the things you want to change in the ddl-script and then drop and recreate the table (using the script). Don't forget to export data you want to keep ....


Peter
Reply With Quote
  #3 (permalink)  
Old 07-06-04, 04:16
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
When DB2 8.2 (known as Stinger) is available early next year, you will be able to change these things on an existing table.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On