[EMAIL PROTECTED] schrieb am Freitag, 24. August 2001, 13:43:15:
> 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.
Well this should be. You should have more constraints like
AND a.name LIKE 'joe%' or something
or you use
SELECT DISTINCT
See also
http://www.mysql.com/doc/S/E/SELECT.html
http://www.mysql.com/doc/D/I/DISTINCT_optimization.html
Herzlich
Werner
--
MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Dr. Werner Stürenburg <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant
/_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany
<___/ www.mysql.com +49-5224-997-407 Fax -409
---------------------------------------------------------------------
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