0 votes
in Sql by
How MySQL Optimizes DISTINCT?

1 Answer

0 votes
by
DISTINCT is converted to a GROUP BY on all columns and it will be combined with ORDER BY clause.

SELECT DISTINCT t1.a FROM t1,t2 where t1.a=t2.a;

Related questions

0 votes
asked Jan 13 in Sql by DavidAnderson
0 votes
asked Jan 13 in Sql by DavidAnderson
...