С этими 3 столами ...
Курсы:
CourseName
intro. Flash
intro. Java
intro. to Photoshop
into. To Orcad
intro. to c++
PIC
Персонал:
sname
Khalid
Rami
Rayan
Персонал Курсы:
sname Trainingcourse
Khalid into. To Orcad
Rami intro. Flash
Rami intro. to Photoshop
Rayan intro. Java
.. этот запрос ...
SELECT
xjoin.sname,
xjoin.CourseName
FROM
[
SELECT Courses.CourseName, Staff.sname FROM Courses, Staff
]. AS xjoin
LEFT JOIN StaffCourses
ON
(xjoin.CourseName = StaffCourses.Trainingcourse)
AND (xjoin.sname = StaffCourses.sname)
WHERE
(((StaffCourses.Trainingcourse) Is Null))
ORDER BY
xjoin.sname,
xjoin.CourseName;
... производит этот набор результатов:
sname CourseName
Khalid intro. Flash
Khalid intro. Java
Khalid intro. to c++
Khalid intro. to Photoshop
Khalid PIC
Rami into. To Orcad
Rami intro. Java
Rami intro. to c++
Rami PIC
Rayan into. To Orcad
Rayan intro. Flash
Rayan intro. to c++
Rayan intro. to Photoshop
Rayan PIC