Subject | Re: [firebird-support] Finding primary key field RDB$ tables |
---|---|
Author | Helen Borrie |
Post date | 2005-03-29T00:50:48Z |
At 12:10 AM 29/03/2005 +0200, you wrote:
from rdb$relation_constraints rc
join rdb$index_segments ris
on ris.rdb$index_name = rc.rdb$index_name
where rc.rdb$relation_name = 'ATABLE'
and rc.rdb$constraint_type = 'PRIMARY KEY'
./hb
>Hiselect ris.rdb$field_name
>
>How do I from the RDB$ tables find out which field in a table that is
>primary key?
from rdb$relation_constraints rc
join rdb$index_segments ris
on ris.rdb$index_name = rc.rdb$index_name
where rc.rdb$relation_name = 'ATABLE'
and rc.rdb$constraint_type = 'PRIMARY KEY'
./hb