I have the following table structure.
A | B | C
I wish to pull column A and B where all the results of A and B are distinct. I wish to ignor column C. My unerstading of the distinct keyword that it looks at the whole row not jst the columns you return. Any ideas how I could do this?
Not so. DISTINCT looks at whatever columns you specify. So for you,
SELECT DISTINCT A, B FROM table.I’d prefer the GROUP BY though:
SELECT A, B FROM table GROUP BY A, B