[thelist] MySQL question

Richard Harb rharb at earthling.net
Mon Apr 18 13:16:27 CDT 2005


Have a look at

http://dev.mysql.com/doc/mysql/en/union.html

HTH

-----Original Message-----
From: Erik Heerlein
Sent: Monday, April 18, 2005, 7:40:49 PM
> I have two tables each with a column called 'email'. I would like to 
> gather up all of the distinct emails from both tables, no duplicates.

> I have tried:

> SELECT DISTINCT table1.email, table2.email
> FROM table1, table2

> but that just gives me two separate columns. I know I've done this 
> before but I can't remember how to do it. Thank you for your time.


[>>] Erik Heerlein




More information about the thelist mailing list