| Message view | « Date » · « Thread » |
|---|---|
| Top | « Date » · « Thread » |
| From | Knut Anders Hatlen <knut.hat...@oracle.com> |
| Subject | Re: SQL: JOIN syntax |
| Date | Mon, 19 Nov 2012 08:36:59 GMT |
John English <john.foreign@gmail.com> writes: > Can anyone tell me what the correct syntax is to make this join work? > > SELECT * from a,b LEFT JOIN c ON a.foo=c.foo AND b.bar=c.bar; > > That is, I want the crossproduct of a and b, with columns from c when > they correspond to rows in BOTH a and b, and nulls if not. Hi John, You could try CROSS JOIN: SELECT * from a CROSS JOIN b LEFT JOIN c ON a.foo=c.foo AND b.bar=c.bar -- Knut Anders | |
| Mime |
|
| View raw message | |