Hi,
can somebody tell me how I can query the system catalog views for composity primary keys associated to columns?
A query like
Code:
SELECT KEYSEQ
FROM SYSCAT.COLUMNS
WHERE TABSCHEMA NOT LIKE 'SYS%'
ORDER BY COLNO
Will show me '1' for primary keys and '2' for foreign keys. The problem is that elements of composite keys that are also foreign keys are allways designated '2'. But I need both that information.
Thx.