SQL查詢課程表
發布時間: 2023-05-31 19:18:58
A. SQL單表查詢:查詢課程表中課程編號為B20112021的課表所有信息
select * from 課程表
where 課程編號='B20112021'
B. 怎麼用SQL語句查詢每個學生選修的課程名及其成績
查詢選修了全部課程的學生型殲姓名
:student是學生表course是選如枯課表sc是課程表卜橡沖
selectsname
fromstudent
wherenotexists
(select*
fromcourse
wherenotexists
(select*
fromsc
wheresno=student.sno
andcno=course.cno)
熱點內容