Subject Re: [firebird-support] How do I get the primary key and fields in the primary key?
Author Cornie van Schoor
On 2010/07/29 15:15, Dunbar, Norman (Capgemini) wrote:
> select RDB$FIELD_POSITION,RDB$FIELD_NAME
> from rdb$index_segments
> where RDB$INDEX_NAME = (
> select RDB$INDEX_NAME
> from RDB$RELATION_CONSTRAINTS
> where rdb$relation_name = 'EMPLOYEE'
> and RDB$CONSTRAINT_TYPE = 'PRIMARY KEY'
> )
> order by RDB$FIELD_POSITION;
Thanks, works like a dream

Cornie