DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: DB2 Table ALTER

  1. #1
    Join Date
    Feb 2004
    Posts
    1

    DB2 Table ALTER

    hi,

    I am trying to ALTER a TABLE to change one of the column's CHAR length.

    Though I connect and login with db2admin rights, the ALTER popup window for the table comes up with uneditable fields.

    I cannot change the CHAR length.

    how can I do this?

    thanks

  2. #2
    Join Date
    Feb 2004
    Location
    UK
    Posts
    3
    Can't be done on a CHAR column as far as I know, only on VARCHAR.

    You also cannot drop a column, so I would create a new table based on your old one replacing the old CHAR column with a new one. Copy the data across the drop the old table and rename the new one.

    DB2's ALTER TABLE online guide is here:

    http://www-306.ibm.com/cgi-bin/db2ww...4.htm#HDRATABL

    BRgds
    J

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center