Re: [firebird-support] Foreign key different field type

2017-06-21 Thread 'livius' liviusliv...@poczta.onet.pl [firebird-support]
m: Ann Harrison aharri...@ibphoenix.com [firebird-support] Sent: Tuesday, June 20, 2017 4:46 PM To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] Foreign key different field type On Mon, Jun 19, 2017 at 1:21 PM, Thomas Steinmaurer t...@iblogmanager.com [firebird-support] <

Re: [firebird-support] Foreign key different field type

2017-06-20 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Mon, Jun 19, 2017 at 1:21 PM, Thomas Steinmaurer t...@iblogmanager.com [firebird-support] wrote: > , > > > > Can someone show me example when it is usefull to have different field > > type in [referenced and referencing keys of a foreign key relationship]? >

Re: [firebird-support] Foreign key different field type

2017-06-20 Thread Svein Erling Tysvær setys...@gmail.com [firebird-support]
Well, I would hope that create procedure ... declare variable i2 TYPE OF COLUMN test2.id1; declare variable i TYPE OF COLUMN test.id; begin i2 = 12345678; i = 12345678; ... would complain about the assignment to i and not i2. Although I agree with you that it sounds rather useless to allow

Re: [firebird-support] Foreign key different field type

2017-06-19 Thread 'livius' liviusliv...@poczta.onet.pl [firebird-support]
ct: Re: [firebird-support] Foreign key different field type > 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) >

[firebird-support] Foreign key different field type

2017-06-19 Thread 'liviusliv...@poczta.onet.pl' liviusliv...@poczta.onet.pl [firebird-support]
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