Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004

    Unanswered: 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~~!!

  2. #2
    Join Date
    Dec 2002

    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 ....


  3. #3
    Join Date
    May 2003
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts