Re: Rows counted but not returned after join

2006-02-02 Thread Dougal Watson
> It seems like a job for a LEFT JOIN. To see the records which > are present in table A and not present in table B use this query: > > SELECT A.* > FROM A > LEFT JOIN B > USING(common_field) > WHERE B.common_field is NULL. Thanks Jeb, I¹ve been working with this idea thi

Re: Rows counted but not returned after join

2006-02-01 Thread Gleb Paharenko
Hello. > trying to write a query to find out whether there are any email >addresses in the first table that do not have a counterpart in the >second. It seems like a job for a LEFT JOIN. To see the records which are present in table A and not present in table B use this query: SELECT A.* FROM A

Rows counted but not returned after join

2006-02-01 Thread Dougal Watson
When I perform a particular query using a join the number of rows counted as hits exceeds the number of rows returned. I think I know why but don't know how to interrogate the database to confirm (and remedy) my suspicion. The basic database structure is two tables. Each table contains an email ad