Subject | Foreign key different field type |
---|---|
Author | liviuslivius@poczta.onet.pl |
Post date | 2017-06-19T14:54:49Z |
Hi,
Can someone show me example when it is usefull to have different field type in relation
Sample
Create table test1 (id smallint not null primary key)
Create table test2 (id1 integer)
Alter table test2 Add foreign key (id1) references test1(id)
Why this is not forbidden?
Regards, Karol Bieniaszewski
Can someone show me example when it is usefull to have different field type in relation
Sample
Create table test1 (id smallint not null primary key)
Create table test2 (id1 integer)
Alter table test2 Add foreign key (id1) references test1(id)
Why this is not forbidden?
Regards, Karol Bieniaszewski