This content has been marked as final. Show 3 replies
What's wrong with SELECT DISTINCT?
At any rate, GROUP BY gets distinct values:
Note that there's no need to use tab_b to get these resutls. "FROM tab_a LEFT OUTER JOIN tab_b" means you want all the rows from tab_a, regardless of whether or not they have a match in tab_b. Since you're not interested in any data from tab_b, and you specifically don't want any replication of rows that might be caused by 2 or more rows in tab_b matching the same row in tab_a, then you'll get the same results with or without the outer join.
SELECT ename FROM tab_a GROUP BY ename ;