I want to know, for removing duplicate rows, which query is better ? (faster and more optimized):
select distinct col from table;
OR
select col from table group by col;
As you see, there is not any aggregate function, So which one is better ? Or in other word, what is the difference between them ?