I have the following table as a result of my query :
value1 name
------ ------
abc JOHN
def JOHN
mno JOHN
mno JOHN
abc JAMES
abc JAMES
def JAMES
mno RICK
In the above table the value mno is repeated twice for JOHN and value abc is repeated twice for JAMES.
The query I used is here :
SELECT tc.value, tr.name
FROM table1 tc, table2 tr
WHERE tc.id = tr.roll
ORDER BY tr.name;
The result i would like to expect is that the duplicate values has to be removed from each name. Result should be something like this:
value1 name
------ ------
abc JOHN
def JOHN
mno JOHN
abc JAMES
def JAMES
mno RICK
I Just want to remove the duplicate value from each name. How can I achieve this ?