From: <[EMAIL PROTECTED]>

> >>My query
> select * from table1,table2 WHERE table1.ID = table2.code

> >> Query results
> 1 2 2
> 
> >> Desired results
> 1 2


Try:

  SELECT * FROM table1,table2
   WHERE table1.ID = table2.code
   GROUP BY table2.code


You'll find this someplace in:

  http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html

But it's a rather thick document.

---
Rodney Broom
Programmer: Desert.Net




---------------------------------------------------------------------
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