In contrast,
the attributes name and building appear in only one of the relations, and therefore
do not need to be prefixed by the relation name.
• The select clause is used to list the attributes desired in the result of a query.
• The from clause is a list of the relations to be accessed in the evaluation of
the query.
• The where clause is a predicate involving attributes of the relation in the
from clause.
A typical SQL query has the form
select A1, A2, . . . , An
from r1, r2, . . . , rm
where P;
Each Ai represents an attribute, and each ri a relation. P is a predicate. If the where
clause is omitted, the predicate P is true.引自 3.3.2 Queries on Multiple Relations