select distinct email from test1 union (select distinct email from test2);
regards,
Devinder Rajput Stores Division Corporate Offices Chicago, IL (773) 442-6474
"Tim Lynch" <admin+pgsqladmin@thirdage.com> Sent by: pgsql-admin-owner@postgresql.org
01/16/2003 04:15 PM
To: pgsql-admin@postgresql.org cc: Subject: [ADMIN] OT: seeking query help, where?
First, sorry for the OT, flame me off-list!
I'm a sysadmin being impressed into dba service. i've been getting along pretty well writing queries and making reports, but i've got some questions. suggestions for a good list/forum for help?
from two tables both with email_addr columns, i want a distinct list of all email_addrs in one column. what i do now is select distinct on each and then sort -u the results.
thanks in advance -t
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)