I have following table:
CREATE TABLE "sys"."tapomay3" (
"id"     INTEGER,
"val"    VARCHAR(20),
"valnum" INTEGER       NOT NULL,
CONSTRAINT "pk3" PRIMARY KEY ("valnum"),
CONSTRAINT "tapomay3_id_val_unique" UNIQUE ("id", "val")
);

I need to get the list of column names that are part of any unique key.

sql>select o.name from keys k, objects o where k.id in (select id from keys where table_id = (select id from tables where name='tapomay3') and name like '%unique') and o.id = k.id;
+---------+
| name    |
+=========+
| id      |
| val     |
+---------+

select o.name from keys k, objects o where k.id in (select id from keys where table_id = (select id from tables where name='tapomay3') and name like '%unique') and o.id = k.id

Is this the right approach?

Thanks and Regards,
Tapomay.