Subject Determine whether an index is descending or ascending using RDB$ tables WAS: Finding primary key field RDB$ tables
Author Svend Meyland Nicolaisen
Thank you very much for the answer on my previous question. Now I have
another probably stupid question:

How do I determine whether an index is descending or ascending using RDB$
tables?


/Svend

> -----Original Message-----
> From: Helen Borrie [mailto:helebor@...]
> Sent: 29. marts 2005 02:51
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] Finding primary key field RDB$ tables
>
>
> At 12:10 AM 29/03/2005 +0200, you wrote:
>
> >Hi
> >
> >How do I from the RDB$ tables find out which field in a
> table that is
> >primary key?
>
> select ris.rdb$field_name
> 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
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>