Subject Re: Find Primary Key for a table
Author Steve Harp
> SELECT C.RDB$RELATION_NAME, I.RDB$FIELD_NAME
> FROM RDB$RELATION_CONSTRAINTS C
> JOIN RDB$INDEX_SEGMENTS I ON (C.RDB$INDEX_NAME = i.RDB$INDEX_NAME)
> WHERE C.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY'
> ORDER BY C.RDB$RELATION_NAME, I.RDB$FIELD_POSITION
>
Perfect! Thanks Adam...