Subject | Re: Getting information about key fields using gds32 |
---|---|
Author | Christoph |
Post date | 2002-10-15T06:06:20Z |
I ended up finding it out by executing an sql statement:
select rdb$field_name
from rdb$index_segments, rdb$relation_constraints
where rdb$index_segments.rdb$index_name =
rdb$relation_constraints.rdb$index_name
and rdb$relation_constraints.rdb$constraint_type = 'PRIMARY KEY'
and rdb$relation_constraints.rdb$relation_name = 'TEST_TABLE'
Is there a better way to do it?
Christoph
select rdb$field_name
from rdb$index_segments, rdb$relation_constraints
where rdb$index_segments.rdb$index_name =
rdb$relation_constraints.rdb$index_name
and rdb$relation_constraints.rdb$constraint_type = 'PRIMARY KEY'
and rdb$relation_constraints.rdb$relation_name = 'TEST_TABLE'
Is there a better way to do it?
Christoph
--- In ib-support@y..., "Christoph" <yahoo@a...> wrote:
>
> I can't seem to find any information about finding out which fields in
> a table are part of the key using gds32.
>
> I have looked in the api guide and the ibase.h and the net. Sorry if
> this is obvious and I am just missing it?
>
> Can somebody help please?
>
>
> Christoph