Subject Re: [firebird-support] foreign key strangeness
Author Daniel Aut
Hi,
I think the columns must be same datatype.
id1 -> integer
fk2 -> char(5)!!!!

----- Original Message ----- > CREATE TABLE Test1
> (
> id1 INTEGER NOT NULL,
> data1 CHAR(20),
> PRIMARY KEY (id1)
> );
>
> CREATE TABLE Test2
> (
> fk2 CHAR(5) NOT NULL,
> data2 CHAR(20),
> FOREIGN KEY (fk2) REFERENCES Test1 (id1)
> );
>
> As you can see, the foreign key is referencing a primary key of a
different
> data type. When creating these tables, FB does not complain (tested Win2k
> FB1.5RC6 & RC7).