Here is my table data…lets call this table TABLEX
ID COL1 COL2
------------------------------
100 a b
101 x y
102 a b
103 c d
104 e f
105 a b
106 c d
107 x y
I want following records to be retrieved from this table
ID COL1 COL2
------------------------------
100 a b
101 x y
103 c d
104 e f
In other words I want to retrieve distinct values from COL1 + COL2 but also show along with records’ ID.
1 Answer