Skip to Content
Custom Search

Reply to comment







I had a requirement where I was supposed to add a new column 
to a DB2 table and add this column to the Primary Key contraint.
This table already had three columns part of Primary key.
As per my solution I decided to 
  • Alter the table to add new column
  • Drop the existing Primary Key contraint
  • and Add a new primary key contraint which has all the four columns
Now this query did fail in the third step, i.e while
creating the primary key constraint and gave me some sql error, 
indicating that there does not exist a unique index on the table.
Since the column has already got added, I do not want to drop it and 
start all over again, Is it possible to somehow fix the problem 
without restoring and restarting from scratch.


  • Allowed HTML tags:
      1. Lines and paragraphs break automatically.

    More information about formatting options

    This question is for testing whether you are a human visitor and to prevent automated spam submissions.


Click the +1 button  below to share it with your friends and colleagues


Share this if you liked it!



Number of Registered users 714
Theme by Dr. Radut.