IntegrityWebDev - 5:15 pm on Jul 14, 2010 (gmt 0)
I thought I understood DISTINCT but I'm doing something wrong (using MySQL).
I have a table with several columns, and I need to return results based on DISTINCT col2. But I need more than just col2 returned...so I tried:
SELECT DISTINCT col2, col1 FROM table WHERE col3 <> '' ORDER BY col3
but this has returned the equivalent of
SELECT col2, col1 FROM table WHERE col3 <> '' ORDER BY col3