April 2002
Intermediate to advanced
416 pages
11h 50m
English
A join is query that selects more than one table. Normally the tables are linked by fields that have the same meaning. The linking fields do not need to have the same names, although joins are less confusing if the do.
Suppose the Students table has a StudentId field. The TestScores table also has a StudentId field indicating the student who got a particular score. The two StudentId fields link the tables. The following query joins the two tables to select student information from the Students table plus test scores from the TestScores table:
SELECT TestNumber, LastName, FirstName, Score FROM Students, TestScores WHERE Students.StudentId = TestScores.StudentId ORDER BY TestNumber, LastName, FirstName, Score
In many cases, that’s as ...
Read now
Unlock full access