I'm curious if USING() works with more than one join. I can't seem to get it
to work.

http://dev.mysql.com/doc/mysql/en/JOIN.html


The USING (column_list) clause names a list of columns that must exist in
both tables. 
The following two clauses are semantically identical: 

a LEFT JOIN b USING (c1,c2,c3)
a LEFT JOIN b ON a.c1 = b.c1 AND a.c2 = b.c2 AND a.c3 = b.c3

How would you do something like

a LEFT JOIN b ON a.c1 = b.c1
   LEFT JOIN c ON c.c2 = a.c2

I thought it would be as simple as

a LEFT JOIN b USING (c1) 
   LEFT JOIN c USING (c2)

But it fails.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to