Page 1 of 1

search query across different DB tables

Posted: Tue May 03, 2005 2:21 am
by genux33
How should i go about to perform a search query across different tables in the DB.

For example
i had 2 table called individual and student.
Both table contain same field called "email"

how do i build the SQL query that will return the result of email search query.
for example WHERE email = "test@test.com"

Posted: Tue May 03, 2005 3:16 am
by timvw
union is the keyword you need for a websearch. If you are using MySQL you might want to lookup if it is supported for your version..