Subject | Re: [ib-support] Implementing referential integrity |
---|---|
Author | Stevio |
Post date | 2002-06-27T14:04:19Z |
Here's the error message:
Unsuccessful metadata update
STORE RDB$REF_CONSTRAINTS failed
action cancelled by trigger (1) to preserve data integrity
Name of Referential Constraint not defined in constraints table
Statement: ALTER TABLE BOOK ADD FOREIGN KEY (CODING_ID) REFERENCES CODING
(CODING_ID)
Unsuccessful metadata update
STORE RDB$REF_CONSTRAINTS failed
action cancelled by trigger (1) to preserve data integrity
Name of Referential Constraint not defined in constraints table
Statement: ALTER TABLE BOOK ADD FOREIGN KEY (CODING_ID) REFERENCES CODING
(CODING_ID)
----- Original Message -----
From: "Martijn Tonies" <m.tonies@...>
> What's the error message? And what is the table metadata for both
> tables?
>
> Martijn Tonies
>
> > What is wrong with the following for adding a foreign key to a table?
> >
> > ALTER TABLE BOOK ADD CODING_ID INTEGER;
> > ALTER TABLE BOOK ADD FOREIGN KEY (CODING_ID) REFERENCES CODING
> (CODING_ID);
> >
> > Thanks,
> > Stephen