課程(課程編號,課程名稱,學分)
老師(老師證號,老師姓名,導師班級,辦公室號)
學生(學生證號,學生姓名,班級)
學務(課程編號,老師證號,學生證號,成績,上課教室)
列出所有課程皆及格的學生的學生姓名
想要請問如果用not exists......not 去解可否寫成
select 學生姓名 from 學生
where not exists (
select * from 課程 where not exists(
select * from 學務 where 學務.學生證號=學生.學生證號
and 學務.課程編號=課程.課程編號 and 學務.成績>=60
))
有錯麻煩指教一下 謝謝各位
--
老師(老師證號,老師姓名,導師班級,辦公室號)
學生(學生證號,學生姓名,班級)
學務(課程編號,老師證號,學生證號,成績,上課教室)
列出所有課程皆及格的學生的學生姓名
想要請問如果用not exists......not 去解可否寫成
select 學生姓名 from 學生
where not exists (
select * from 課程 where not exists(
select * from 學務 where 學務.學生證號=學生.學生證號
and 學務.課程編號=課程.課程編號 and 學務.成績>=60
))
有錯麻煩指教一下 謝謝各位
--
All Comments