Prev | Current Page 410 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"

Sname = ClubMembership.MemberName;
The ???dot notation??? in the last line says that we are interested in joining rows where the Sname column in
the Student table matches the MemberName column in the ClubMembership table. The results of this
query will include a row for each student who participates in a club, and if a student participates in more than
one club, there will be multiple rows for that student. What if one also wanted to know which students did not
participate in any clubs? A solution would be to use an ???outer join.???
A standard, or ???inner,??? join assembles information from a pair of tables by making a new row combining
the attributes of both tables whenever there is a match between tables on the join condition. In the previous
example, whenever there is a match between Sname in the Student table and MemberName in the
ClubMembership table, the join creates a new row that includes all the attributes of both tables. The
SELECT then reports the values of Sname, Major, and Cname from the combined row.
An outer join includes each row in one or both tables, regardless of whether the row matches on the join
condition. For instance, to show all students, regardless of club membership, the query above can be modified
with the word LEFT:
152 DATABASE [CHAP.


Pages:
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422
pokoje nad morzem międzyzdroje remont warszawa pozycjonowanie stron w google wczasy matki z dzieckiem Pompy zatapialne