> table a has ak1 and ak2 as primary key
> table b has bk1 and bk2 as primary key
> how do I join these tables?
> 
> if i write
> where a.ak1 = b.bk1 and a.ak2 = b.bk2
> data are returned multiple times.

AnneMarie,

When you say "data are returned multiple times" please clarify what you mean:

a) Does the join return two identical rows/records?
presumably the first time because ak1=bk1 and the second because ak2=bk2 also.

or
b) Do you mean that the join/result features single rows but with multiple columns?
ie ak1, ak2, bk1, bk2 - where one pair of columns is (by definition) redundant.

I can generate the second, but not the first.
Please advise,
=dn



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to