<html><head></head><body>Using the example:<br>
SELECT '' AS "xxx", *<br>
FROM J1_TBL LEFT OUTER JOIN J2_TBL USING (i);<br>
<br>
..doesn't work because the columns which I am using to join the tables don't
have the same name. How do i specify the columns if they don't have the same
name?<br>
<br>
Poul L. Christiansen<br>
<br>
Tom Lane wrote:<br>
<blockquote type="cite" cite="mid:6858(dot)976116402(at)sss(dot)pgh(dot)pa(dot)us"><pre wrap="">"Poul L. Christiansen" <a class="moz-txt-link-rfc2396E" href="mailto:poulc(at)cs(dot)auc(dot)dk"><poulc(at)cs(dot)auc(dot)dk></a> writes:<br></pre>
<blockquote type="cite"><pre wrap="">But how do I make an outer join? <br>What's the syntax?<br>I will RTFM if someone points me to the docs :-)<br></pre></blockquote>
<pre wrap=""><!----><br>I'm afraid I haven't updated the FM yet :-( ... but you could look at<br>the examples in the JOIN regress test, src/test/regress/sql/join.sql.<br><br>Or, from the SQL92 spec, here's the grammar:<br><br> <from clause> ::= FROM <table reference> [ { <comma> <table reference> }... ]<br><br> <table reference> ::=<br> <table name> [ [ AS ] <correlation name><br> [ <left paren> <derived column list> <right paren> ] ]<br> | <derived table> [ AS ] <correlation name><br> [ <left paren> <derived column list> <right paren> ]<br> | <joined table><br><br> <derived table> ::= <table subquery><br><br> <derived column list> ::= <column name list><br><br> <column name list> ::=<br> <column name> [ { <comma> <column name> }...
</blockquote>
<br>
</body></html>