Databases Reference
In-Depth Information
Changing the name of Small House in this result table would be disastrous, since we
would not know which Small House was being affected!
On the other hand, the result table of the DISTINCTROW statement has a
“representative” from each row of the PUBLISHERS table, as Table 6-9 shows. Hence,
while it still may not be a good idea to change this particular table, since we cannot tell
which Small House is which, it would be reasonable to make a change to both names, for
instance.
Table 6-9. The tblDISTINCTROW table
PubName
S mall House
B ig House
A lpha Press
S mall House
More generally, Access does not permit updating of the result table of a DISTINCT
statement, but it does permit updating of the result table for a DISTINCTROW statement.
Finally, we mention that Microsoft Access includes the DISTINCTROW keyword by
default when you create a query using the Access Query Design Window.
6.7.3.2 ReturnColumnDescription
The ReturnColumnDescription describes the columns, or combination of columns, to
return. It can be any of the following:
* (indicating all columns)
The name of a column
An expression involving column names, enclosed in brackets, along with strings
and string operators; for example, [PubID] & "-" & [Title]
(Note that, according to the syntax of the SELECT statement, ReturnColumnDescription
can be repeated as many times as desired.)
When two returned columns (from different tables) have the same name, it is necessary to
qualify the column names using the table names. For instance, to qualify the PubID
column name, we write BOOKS.PubID and PUBLISHERS.PubID. We can also write
BOOKS.* to indicate all columns of the BOOKS table.
Finally, each ReturnColumnDescription can end with:
[AS AliasName]
to give the return column a (new) name. For example, the following statement:
Search WWH ::




Custom Search