On Fri, Mar 22, 2002 at 04:37:07PM +0000, ds wrote:
> Hi, did you get any answer ?
> I'm having the same problem. 
> 
> If i wanted all results from table1, even if they don't appear in table2
> i would do like:
> 
> SELECT ..... FROM table1 LEFT JOIN table2 ON (table1.id=table2.id) ...
> 
> But how to join 
> 
> SELECT ..... FROM table1 LEFT JOIN table2 ON (table1.id=table2.id) ...
> and 
> SELECT ..... FROM table2 LEFT JOIN table2 ON (table1.id=table2.id) ...
> table1. Idem for table2. 

Outer join:

SELECT ... FROM ... LEFT JOIN ON ...
UNION
SELECT ... FROM... RIGHT JOIN ON ...;

Bob Hall
--
sql, query

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