I have two unique keys in one table and I want to write a query that connects me to two unique keys and displays them in one record. Right now, the question returns 2 records to me where unique key = ID in the first and unique key = PM in the second record. And I would like to have one record unique key = ID. I want to try the Procedure described here but I'm scared that I am doing wrong. Can someone give some insight here?
i.COLNAMES AS CCOLUMNS, C.TABNAME
FROM syscat.columns C
JOIN SYSCAT.INDEXES I ON I.TABNAME = C.TABNAME
WHERE UNIQUERULE IN ('P','U')