Subject | Re: Find Primary Key for a table |
---|---|
Author | Steve Harp |
Post date | 2006-02-06T03:13:15Z |
> SELECT C.RDB$RELATION_NAME, I.RDB$FIELD_NAMEPerfect! Thanks Adam...
> 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
>