INGRES
SQL
SLIDE #14 SELECTING DATA BETWEEN SEVERAL RELATIONS
To select data from several relations, we use the select command,
in conjunction with the from clause and the where commands.
select name, teacher
from student, course, grade
where student.name=grade.name
and grade.course_id=course.course_id;
The where clause specifies that we want:
. student name in the student relation and grade relation to be identical
. course_id in the course relation and grade relation to be identical
We edit a file, called sqlsession7 to select data from several relations.