Re: Problem with primary key
Posted in 1998
The idxname will allow you a link to sysindexes which stores information =
about the index including up to 16 column numbers. The colname can then =
be derived from syscolumns.
unfortunately sysindexes is denormalised so if you want to automate a =
lookup with sql it will be messy.
rgds
Peter Tashkoff <tashkop@iname.com>
Zespri International Limited Std Disclaimers Apply
All rights reserved. No party may use this document to vilify another.
Zespri New Zealand Kiwifruit, The World's Finest
>>> Vinhson <nguyenv@cognos.com> 21/01/98 04:51:05 >>>
Hello all,
I'm using Informix Server 7.2x. The Informix system table
sysconstraints allows me to find out if a given table, say
known_table, has a primary key via, for instance,
select * from informix.sysconstraints
where tabid =3D tabid_of_known_table
Suppose that the above select query indicated that known_table
has a primary key. Does anyone know how I can find the column name
associated with that key?
Any help or suggestion is very much appreciated.
Vinhson
Email: nguyenv@cognos.com