Re: syntax of outer join in 7.1devel

From: "Poul L(dot) Christiansen" <poulc(at)cs(dot)auc(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: syntax of outer join in 7.1devel
Date: 2000-12-06 23:57:49
Message-ID: 3A2ED27D.6000506@cs.auc.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<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">&lt;poulc(at)cs(dot)auc(dot)dk&gt;</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> &lt;from clause&gt; ::= FROM &lt;table reference&gt; [ { &lt;comma&gt; &lt;table reference&gt; }... ]<br><br> &lt;table reference&gt; ::=<br> &lt;table name&gt; [ [ AS ] &lt;correlation name&gt;<br> [ &lt;left paren&gt; &lt;derived column list&gt; &lt;right paren&gt; ] ]<br> | &lt;derived table&gt; [ AS ] &lt;correlation name&gt;<br> [ &lt;left paren&gt; &lt;derived column list&gt; &lt;right paren&gt; ]<br> | &lt;joined table&gt;<br><br> &lt;derived table&gt; ::= &lt;table subquery&gt;<br><br> &lt;derived column list&gt; ::= &lt;column name list&gt;<br><br> &lt;column name list&gt; ::=<br> &lt;column name&gt; [ { &lt;comma&gt; &lt;column name&gt; }...
</blockquote>
<br>
</body></html>

Attachment Content-Type Size
unknown_filename text/html 1.8 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Pilley 2000-12-07 00:12:58 INSTALL Problems (Again) :(
Previous Message John Pilley 2000-12-06 23:31:28 Request for INSTALL help