SELECT a.tabname, b.constrname, d.colname FROM systables a, sysconstraints b, sysindexes c, syscolumns d WHERE a.tabname = :table_name AND b.tabid = a.tabid AND c.idxname = b.idxname AND d.tabid = a.tabid AND ( d.colno = c.part1 or d.colno = c.part2 or d.colno = c.part3 or d.colno = c.part4 or d.colno = c.part5 or d.colno = c.part6 or d.colno = c.part7 or d.colno = c.part8 or d.colno = c.part9 or d.colno = c.part10 or d.colno = c.part11 or d.colno = c.part12 or d.colno = c.part13 or d.colno = c.part14 or d.colno = c.part15 or d.colno = c.part16 ) ORDER BY a.tabname, b.constrname, d.colname;