Drop column in a table
Posted in 1999
Topics: Triggers, Constraints & Referential Integrity
Hello, We have developped a program for SQLBase and Oracle, now we are testing our software under an Informix database. We have a problem when we drop a column in a table, because all indexes, primary and foreign keys are dropped for ALL COLUMNS of that table. Is there a way that only the indexes and constraints are dropped for the specified column ? Thanks Hans Ronken.
HI Buddy, I don't believe that when you drop one column then it drops all Primary key/foreign key constraints on that table. It only drops those constraints that include the column being dropped as part of the constraint. If a constraint does not contain that column in it then such a constraint will not be dropped. There is some amount of recursive effect here because of which some other constraint could get dropped. say there is a constraint on columns (col1,col2) and another constraint on col2 and if you drop col1 then it would cause both of these constraints to be dropped. Thanks, Khem Chander. kchande@yahoo.com osgarets wrote: > Hello, > > We have developped a program for SQLBase and Oracle, now we are testing > our software under an Informix database. We have a problem when we drop > a column in a table, because all indexes, primary and foreign keys are > dropped for ALL COLUMNS of that table. Is there a way that only the > indexes and constraints are dropped for the specified column ? > > Thanks > > Hans Ronken.