Subject Re: [firebird-support]: Foreign key
Author Adam
--- In, "Codebue Fabio - P-Soft"
<f.codebue@...> wrote:
> I wanna use foreign key .
> If I create a foreign key on fieldA into table A and I connect to field
> fieldB into table B
> fieldB have to be a primary key or would be a simple unique key?
> I try to create with a UK but nothing todo....

You can connect it to any field with a declared unique constraint
providing the data types are both the same. Note that a 'unique index'
is not good enough, it must be declared as a 'unique constraint'.


PS: Please do not reply to messages if your reply has nothing to do
with the original subject. You replied to the message 'This is a bug'
and changed the subject and deleted all the text, but that is not good
enough. The message header links the message together, so many people
will not see your question if they have chosen to ignore the thread.
Instead, compose a new message.