Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49d7165

Browse files
committed
doc: Change table alias names to lower case in tutorial chapter
This is needlessly different from our usual style otherwise.Author: Jürgen Purtz <juergen@purtz.de>Discussion:https://www.postgresql.org/message-id/flat/158996922318.7035.10603922579567326239@wrigleys.postgresql.org
1 parent79fd620 commit49d7165

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

‎doc/src/sgml/query.sgml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -609,11 +609,11 @@ SELECT *
609609
following query:
610610

611611
<programlisting>
612-
SELECTW1.city,W1.temp_lo AS low,W1.temp_hi AS high,
613-
W2.city,W2.temp_lo AS low,W2.temp_hi AS high
614-
FROM weatherW1, weatherW2
615-
WHEREW1.temp_lo &lt;W2.temp_lo
616-
ANDW1.temp_hi &gt;W2.temp_hi;
612+
SELECTw1.city,w1.temp_lo AS low,w1.temp_hi AS high,
613+
w2.city,w2.temp_lo AS low,w2.temp_hi AS high
614+
FROM weatherw1, weatherw2
615+
WHEREw1.temp_lo &lt;w2.temp_lo
616+
ANDw1.temp_hi &gt;w2.temp_hi;
617617
</programlisting>
618618

619619
<screen>
@@ -624,8 +624,8 @@ SELECT W1.city, W1.temp_lo AS low, W1.temp_hi AS high,
624624
(2 rows)
625625
</screen>
626626

627-
Here we have relabeled the weather table as <literal>W1</literal> and
628-
<literal>W2</literal> to be able to distinguish the left and right side
627+
Here we have relabeled the weather table as <literal>w1</literal> and
628+
<literal>w2</literal> to be able to distinguish the left and right side
629629
of the join. You can also use these kinds of aliases in other
630630
queries to save some typing, e.g.:
631631
<programlisting>

‎src/tutorial/basics.source

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ SELECT *
126126
FROM weather LEFT OUTER JOIN cities ON (weather.city = cities.name);
127127

128128
-- Suppose we want to find all the records that are in the temperature range
129-
-- of other records.W1 andW2 are aliases for weather.
129+
-- of other records.w1 andw2 are aliases for weather.
130130

131-
SELECTW1.city,W1.temp_lo,W1.temp_hi,
132-
W2.city,W2.temp_lo,W2.temp_hi
133-
FROM weatherW1, weatherW2
134-
WHEREW1.temp_lo <W2.temp_lo
135-
andW1.temp_hi >W2.temp_hi;
131+
SELECTw1.city,w1.temp_lo,w1.temp_hi,
132+
w2.city,w2.temp_lo,w2.temp_hi
133+
FROM weatherw1, weatherw2
134+
WHEREw1.temp_lo <w2.temp_lo
135+
andw1.temp_hi >w2.temp_hi;
136136

137137

138138
-----------------------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp