Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
505cdd58
Commit
505cdd58
authored
Jan 22, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update FAQ.
parent
5f93794f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
17 deletions
+27
-17
doc/FAQ
doc/FAQ
+11
-6
doc/src/FAQ/FAQ.html
doc/src/FAQ/FAQ.html
+16
-11
No files found.
doc/FAQ
View file @
505cdd58
...
@@ -948,15 +948,20 @@ SELECT *
...
@@ -948,15 +948,20 @@ SELECT *
4.24) How do I do an outer join?
4.24) How do I do an outer join?
PostgreSQL 7.1 and later supports outer joins. Here is an example:
PostgreSQL 7.1 and later supports outer joins. Here are two examples:
SELECT *
FROM t1 LEFT OUTER JOIN t2 ON (t1.col = t2.col);
or
SELECT *
SELECT *
FROM t1 LEFT OUTER JOIN t2 USING (col);
FROM t1 LEFT OUTER JOIN t2 USING (col);
This will join t1.col to t2.col, and return any unjoined rows in t1
These identical queries join t1.col to t2.col, and return any unjoined
with NULL values for t2 columns. A RIGHT join would return unjoined
rows in t1. A RIGHT join would return unjoined rows of table t2. A
rows of table t2. A FULL join would return unjoined rows from t1 and
FULL join would return unjoined rows from t1 and t2. The word OUTER is
t2. The word OUTER is optional and is assumed in LEFT, RIGHT, and FULL
optional and is assumed in LEFT, RIGHT, and FULL joins. Ordinary joins
joins. Ordinary joins are called INNER joins.
are called INNER joins.
In previous releases, outer joins can be simulated using UNION and NOT
In previous releases, outer joins can be simulated using UNION and NOT
IN. For example, when joining tab1 and tab2, the following query does
IN. For example, when joining tab1 and tab2, the following query does
an outer join of the two tables:
an outer join of the two tables:
...
...
doc/src/FAQ/FAQ.html
View file @
505cdd58
...
@@ -1224,21 +1224,26 @@ Lobby your company to join W3C, see http://www.w3.org/Consortium
...
@@ -1224,21 +1224,26 @@ Lobby your company to join W3C, see http://www.w3.org/Consortium
<H4><A
name=
"4.24"
>
4.24
</A>
) How do I do an
<I>
outer
</I>
join?
<BR>
<H4><A
name=
"4.24"
>
4.24
</A>
) How do I do an
<I>
outer
</I>
join?
<BR>
</H4>
</H4>
<P>
PostgreSQL 7.1 and later supports outer joins. Here is an
<P>
PostgreSQL 7.1 and later supports outer joins. Here are two
example:
</P>
examples:
</P>
<PRE>
SELECT *
FROM t1 LEFT OUTER JOIN t2 ON (t1.col = t2.col);
</PRE>
or
<PRE>
<PRE>
SELECT *
SELECT *
FROM t1 LEFT OUTER JOIN t2 USING (col);
FROM t1 LEFT OUTER JOIN t2 USING (col);
</PRE>
</PRE>
Th
is will join t1.col to t2.col, and return any unjoined rows in t1
Th
ese identical queries join t1.col to t2.col, and return any
with
<SMALL>
NULL
</SMALL>
values for t2 columns. A
unjoined rows in t1. A
<SMALL>
RIGHT
</SMALL>
join would return
<SMALL>
RIGHT
</SMALL>
join would return unjoined rows of table t2. A
unjoined rows of table t2. A
<SMALL>
FULL
</SMALL>
join would return
<SMALL>
FULL
</SMALL>
join would return unjoined rows from t1 and t2.
unjoined rows from t1 and t2. The word
<SMALL>
OUTER
</SMALL>
is
The word
<SMALL>
OUTER
</SMALL>
is optional and is assumed in
optional and is assumed in
<SMALL>
LEFT
</SMALL>
,
<SMALL>
LEFT
</SMALL>
,
<SMALL>
RIGHT
</SMALL>
, and
<SMALL>
FULL
</SMALL>
<SMALL>
RIGHT
</SMALL>
, and
<SMALL>
FULL
</SMALL>
joins. Ordinary joins
joins. Ordinary joins are called
<SMALL>
INNER
</SMALL>
joins.
<BR
>
are called
<SMALL>
INNER
</SMALL>
joins.
</P
>
<BR>
In previous releases, outer joins can be simulated using
<P>
In previous releases, outer joins can be simulated using
<SMALL>
UNION
</SMALL>
and
<SMALL>
NOT IN
</SMALL>
. For example, when
<SMALL>
UNION
</SMALL>
and
<SMALL>
NOT IN
</SMALL>
. For example, when
joining
<I>
tab1
</I>
and
<I>
tab2,
</I>
the following query does an
joining
<I>
tab1
</I>
and
<I>
tab2,
</I>
the following query does an
<I>
outer
</I>
join of the two tables:
<BR>
<I>
outer
</I>
join of the two tables:
<BR>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment