データベースに 3 つのテーブルがあります
- 標準
- 先生
- コース
に関連付けられているテーブルretrieve all the coursesから取得したい。coursespecific standard
ご了承ください :
- と
1 to many relationshipの間standardにありteacherます。 - と
1 to many relationshipの間teacherにありcourseます。 - と
no direct relationshipの間standardにありcourseます。
私はそれを取得しようとしましたが、取得している教師の数が複数であり、SQL がそれを示しているため、データを取得できませんでしたmultiple values are not allowed。方法はありますか?
これが私のクエリです:
select CourseName
from Course
where Course.TeacherID = (
select TeacherID
from Teacher
where StandardID = 7
)