Advertisement

Udemy WW Udemy WW

Saturday, 21 April 2012

Distinct value in two column

I have a query in mysql
select f1,f2,f3 from tableName;
I want to remove duplicate value in field f1 and f2 only,

actual query is:
SELECT f1,f2,f3
FROM (SELECT f1,f2,f3 FROM tableName  GROUP BY f1) AS table1 GROUP BY f2;

2 comments:

Advertisement

Udemy WW