Re: syntax of outer join in 7.1devel
От | Bruce Momjian |
---|---|
Тема | Re: syntax of outer join in 7.1devel |
Дата | |
Msg-id | 200101230350.WAA02818@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: syntax of outer join in 7.1devel ("Poul L. Christiansen" <poulc@cs.auc.dk>) |
Список | 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.976116402@sss.pgh.pa.us"><pre wrap="">"Poul L. Christiansen" <a class="moz-txt-link-rfc2396E"href="mailto:poulc@cs.auc.dk"><poulc@cs.auc.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 someonepoints 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 theJOIN 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> <tablereference> ::=<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> <columnname> [ { <comma> <column name> }... > </blockquote> > <br> > </body></html> > > > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
В списке pgsql-general по дате отправления: