Subject | Changing Primary Key datatype |
---|---|
Author | sdbeames |
Post date | 2003-07-13T08:01:43Z |
Is it possible to change a PK datatype from SMALLINT to INTEGER?
I've though I'd removed all the dependants, but get an error
messages like...
ALTER TABLE CATEGORY3 drop constraint INTEG_101;
// $$ ******** ERROR ************* $$
//FAILED - unsuccessful metadata update
//ERASE RDB$RELATION_CONSTRAINTS failed
//action cancelled by trigger (1) to preserve data integrity
//Cannot delete PRIMARY KEY being used in FOREIGN KEY
definition.
//
commit;
SET term ^;
ALTER TABLE CATEGORY3
ALTER COLUMN CAT3NO TYPE INTEGER^
// $$ ******** ERROR ************* $$
//FAILED - unsuccessful metadata update
//MODIFY RDB$RELATION_FIELDS failed
//action cancelled by trigger (1) to preserve data integrity
//Cannot update index segment used by an Integrity Constraint
Using FB1
Thanks,
Steve
I've though I'd removed all the dependants, but get an error
messages like...
ALTER TABLE CATEGORY3 drop constraint INTEG_101;
// $$ ******** ERROR ************* $$
//FAILED - unsuccessful metadata update
//ERASE RDB$RELATION_CONSTRAINTS failed
//action cancelled by trigger (1) to preserve data integrity
//Cannot delete PRIMARY KEY being used in FOREIGN KEY
definition.
//
commit;
SET term ^;
ALTER TABLE CATEGORY3
ALTER COLUMN CAT3NO TYPE INTEGER^
// $$ ******** ERROR ************* $$
//FAILED - unsuccessful metadata update
//MODIFY RDB$RELATION_FIELDS failed
//action cancelled by trigger (1) to preserve data integrity
//Cannot update index segment used by an Integrity Constraint
Using FB1
Thanks,
Steve