What is the SELECT statement that, given a student name, will return his list of course names? I think this may be some of it:
SELECT c.course_name FROM Course c
INNER JOIN Enrollment e ON c.course_id = e.course_id
...
WHERE s.student_name = 'Tom';
Beyond that, I'm clueless.
(This isn't homework, it's just a simplification of a work problem.)
SELECT c.course_name FROM Enrollment e
INNER JOIN Course c ON c.course_id = e.course_id
INNER JOIN Student s ON s.student_id = e.student_id
WHERE s.student_name = 'Tom';
also
SELECT c.course_name
FROM Enrollment e, Course c, Student s
WHERE c.course_id = e.course_id
AND s.student_id = e.student_id
AND s.student_name = 'Tom';
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.