Subject Two constraints for different columns
Author Andreas Tille
Hello,

I've shortened my problem as much as possible to show the effect.
I have to tables created as


CREATE TABLE Menu (
IdMenu int NOT NULL ,
PRIMARY KEY (IdMenu)
) ;

CREATE TABLE WebSeite (
IdWebSeite integer NOT NULL,
PRIMARY KEY (IdWebseite)
);

Well in fact they contain more columns but just to make it simple.
Now I wanted to create a further table:

SQL> CREATE TABLE MenuItem (
CON> IdMenu int CONSTRAINT Menu NOT NULL ,
CON> IdWebSeite int CONSTRAINT WebSeite NOT NULL
CON> ) ;
Statement failed, SQLCODE = -607

unsuccessful metadata update
-STORE RDB$RELATION_CONSTRAINTS failed
-attempt to store duplicate value (visible to active transactions) in unique index "RDB$INDEX_12"
SQL>

Could somebody tell me where is the problem in having to CONSTRAINs?
If I leave out the CONSTRAIN to IdWebSeite all works well.

Kind regards

Andreas.