You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add User's Guide chapters on Data Definition and Data Manipulation.
Still needs to be filled with more information, but it gives us a
framework to have a User's Guide with complete coverage of the basic
SQL operations. Move arrays into data type chapter, inheritance into
DDL chapter (for now).
Make <comment>s show up in the output while the version number ends in
"devel".
Allow cross-book references with entities &cite-user; etc.
The previous chapters explained how to create tables, how to fill
8
+
them with data, and how to manipulate that data. Now we finally
9
+
discuss how to retrieve the data out of the database.
10
+
</para>
11
+
6
12
<sect1 id="queries-overview">
7
13
<title>Overview</title>
8
14
9
15
<para>
10
-
A <firstterm>query</firstterm> is the process of retrieving or the command
11
-
to retrieve data from a database. In SQL the <command>SELECT</command>
12
-
commandis used to specify queries. The general syntax of the
13
-
<command>SELECT</command> command is
16
+
The process of retrieving or the command to retrieve data from a
17
+
database is called a <firstterm>query</firstterm>. In SQL the
18
+
<command>SELECT</command> command is used to specify queries. The
19
+
general syntax of the <command>SELECT</command> command is
14
20
<synopsis>
15
21
SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression</replaceable> <optional><replaceable>sort_specification</replaceable></optional>
16
22
</synopsis>
@@ -114,14 +120,14 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
114
120
<para>
115
121
A joined table is a table derived from two other (real or
116
122
derived) tables according to the rules of the particular join
117
-
type. INNER, OUTER, and CROSS JOIN are supported.
123
+
type. Inner, outer, and cross-joins are available.
118
124
</para>
119
125
120
126
<variablelist>
121
127
<title>Join Types</title>
122
128
123
129
<varlistentry>
124
-
<term>CROSS JOIN</term>
130
+
<term>Cross-join</term>
125
131
126
132
<indexterm>
127
133
<primary>joins</primary>
@@ -244,7 +250,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
244
250
<para>
245
251
First, an INNER JOIN is performed. Then, for each row in T1
246
252
that does not satisfy the join condition with any row in
247
-
T2, a joined row is returned with NULL values in columns of
253
+
T2, a joined row is returned with null values in columns of
248
254
T2. Thus, the joined table unconditionally has at least one
249
255
row for each row in T1.
250
256
</para>
@@ -258,7 +264,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
258
264
<para>
259
265
First, an INNER JOIN is performed. Then, for each row in T2
260
266
that does not satisfy the join condition with any row in
261
-
T1, a joined row is returned with NULL values in columns of
267
+
T1, a joined row is returned with null values in columns of
262
268
T1. This is the converse of a left join: the result table will
263
269
unconditionally have a row for each row in T2.
264
270
</para>
@@ -460,7 +466,7 @@ WHERE <replaceable>search_condition</replaceable>
460
466
After the processing of the FROM clause is done, each row of the
461
467
derived table is checked against the search condition. If the
462
468
result of the condition is true, the row is kept in the output
463
-
table, otherwise (that is, if the result is false or NULL) it is
469
+
table, otherwise (that is, if the result is false or null) it is
464
470
discarded. The search condition typically references at least some
465
471
column in the table generated in the FROM clause; this is not
466
472
required, but otherwise the WHERE clause will be fairly useless.
0 commit comments