From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | "Poul L(dot) Christiansen" <poulc(at)cs(dot)auc(dot)dk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: syntax of outer join in 7.1devel |
Date: | 2001-01-23 03:50:49 |
Message-ID: | 200101230350.WAA02818@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
See the updated FAQ on our web site for syntax.
[ text/html is unsupported, treating like TEXT/PLAIN ]
> <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>
>
>
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Tim Kientzle | 2001-01-23 04:05:57 | Re: Troubles with performances |
Previous Message | Prasanth Kumar | 2001-01-23 03:03:07 | Re: Data entry screen building utilities |