onday, May 24, 2004 12:16 PM
Subject: Re: Select statement returning to many answers
> Jonas Lind?n <[EMAIL PROTECTED]> wrote:
> > 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
Hello Jonas,
Looking to the second query I think you're having a "cartesian product". For each row
in one table you get all the rows from the other table. (And that's usually not the
intended result.) This is because there is no join between the tables.
I think that adding a where clause to you
Jonas Lind?n <[EMAIL PROTECTED]> wrote:
> 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.
> 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 F