Re: syntax of outer join in 7.1devel
| От | Poul L. Christiansen |
|---|---|
| Тема | Re: syntax of outer join in 7.1devel |
| Дата | |
| Msg-id | 3A2ED27D.6000506@cs.auc.dk обсуждение исходный текст |
| Ответ на | syntax of outer join in 7.1devel ("Poul L. Christiansen" <poulc@cs.auc.dk>) |
| Ответы |
Re: syntax of outer join in 7.1devel
Re: syntax of outer join in 7.1devel |
| Список | pgsql-general |
Using the example:
SELECT '' AS "xxx", *
FROM J1_TBL LEFT OUTER JOIN J2_TBL USING (i);
..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?
Poul L. Christiansen
Tom Lane wrote:
<pre wr=
ap=3D"">"Poul L. Christiansen" <a class=3D"moz-txt-link-rfc2396E" href=3D"m=
ailto:poulc@cs.auc.dk"><poulc@cs.auc.dk> writes:
But how do I make an outer join?=
What's the syntax?I will RTFM if someone points me to the docs :-)=
I'm afraid I haven't updated the FM yet :-( .=
.. but you could look atthe examples in the JOIN regress test, src/test=
/regress/sql/join.sql.Or, from the SQL92 spec, here's the grammar:<=
br> <from clause> ::=3D FROM <table reference> [ { =
<comma> <table reference> }... ] <table refe=
rence> ::=3D <table name> [ [ AS ] <correlat=
ion name> [ <left paren> <derived column=
list> <right paren> ] ] | <derived table> =
[ AS ] <correlation name> [ <left paren>=
<derived column list> <right paren> ] | <j=
oined table> <derived table> ::=3D <table subqu=
ery> <derived column list> ::=3D <column name l=
ist> <column name list> ::=3D <=
;column name> [ { <comma> <column name> }...
В списке pgsql-general по дате отправления: