> Hello, I am running MySQL5.0.0 on my OpenBSD system. When I excute this
> query I get 153 hits.
>
>     SELECT b.batch_id, b.date, b.creator, b.comments FROM cd_batch as b;
>
> But when I add this table to the where clause i get 5831 hits
>
>     SELECT b.batch_id, b.date, b.creator, b.comments FROM cd_batch as b,
> cd_donor as d;
>
> Why does this happend? I thought that these two queries would return the
> exact same amout of rows. Is there something I have forgotten or is the
> debug release of 5.x.x errornous?

This is expected behaviour. It's called a cathesian product and it returns records_b
x records_d number of rows.

You might find this of help
http://www.w3schools.com/sql/sql_join.asp

Regards,
<mack />


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to