Subject Re: How to get list of foreign keys
Author armenakgrigoryan
Sorry for the confusion. I'm trying to get the list of column names
that are foreign keys.



--- In Firebird-Java@y..., "armenakgrigoryan" <agrigoryan@c...> wrote:
> Hello guys,
>
> Our company going to use Firebird. Everything seems OK except
System
> Tables. I came form Oracle world and there was not any problem to
get
> any information about database metadata. In Firebird I'm kind of
> confusing. Could you please advise me how can I get the list of
> foreign keys. I tried to use SQL request like :
>
> select rc.rdb$constraint_name,
> rc.rdb$relation_name,
> rc.rdb$constraint_type,
> rf.rdb$relation_name
> from rdb$relation_constraints rc,
> rdb$relation_fields rf
> where rc.rdb$constraint_type = "FOREIGN KEY" and
> rc.rdb$relation_name = rf.rdb$relation_name
>
> But the problem is that there is no foreign key describing
> relationship between these two tables.
>
> I would really appreciate your response.
>
> Thanks,
> Armenak Grigoryan