|
Posted by Oli Filth on 10/13/55 11:28
jj wrote:
> thanks for the quick reply it works great, im trying to learn here, can you
> explain why my statement wouldnt work? i have used such statements with the
> AND operator with success before im just curious why the OR doesnt give the
> right output.
>
> select customers_email_address, email from newsletter,customers where
> customers_email_address='t...@test.com' OR email='t...@test.com';
A FROM clause of the form "FROM t1, t2" is syntatically equivalent to
"FROM t1 INNER JOIN t2". An inner join causes the tables to be
multiplied, i.e. the result set is every possible combination of
newsletter.customers_email_address and customers.email. This result set
is then filtered by the WHERE clause.
--
Oli
[Back to original message]
|