tags:

views:

36

answers:

1

I have two columns of coaches names:

coach1
JOHN
JACOB
MARY

coach2
JOHN
JACOB
HENRY

I would like to select all DISTINCT values between the two columns.

So that my SELECT statement will read,

JOHN
JACOB
MARY
HENRY

with no duplicates. Any suggestions as to the most efficient way to do this?

+7  A: 
SELECT COACH1 AS NAME FROM TABLE
UNION
SELECT COACH2 AS NAME FROM TABLE

Is a way to do. I'm not saying it's the "most" efficient to do, though :) Shouldn't be too bad. UNION by default will select only distinct values.

Romain
+1 - beat me to the punch
RC
I've seen that :) I'm trying hard to type fast :P
Romain