Subject Re: [firebird-support] How to avoid automatic foreign key index
Author Helen Borrie
At 08:12 PM 15/03/2008, you wrote:
>Hi,
>
>I have a detail table with a foreign key to another table. Can I
>somehow tell FB to use the primarykey as index for the foreign key
>relation? Or are there any other solutions to avoid the duplicate index?
>
>CREATE TABLE SPLIT
>(
> DISTANCE SMALLINT NOT NULL,
> SWIMRESULTID INTEGER NOT NULL,
> SWIMTIME INTEGER,
> CONSTRAINT PK_SPLIT PRIMARY KEY (SWIMRESULTID, DISTANCE)
>);
>
>ALTER TABLE SPLIT ADD CONSTRAINT FK_SPLIT_SWIMRESULT
> FOREIGN KEY (SWIMRESULTID) REFERENCES SWIMRESULT
> (SWIMRESULTID)
> ON DELETE CASCADE
> ON UPDATE CASCADE

What duplicate index?

./heLen