1. 程式人生 > >sql 面試題

sql 面試題

試題 null cheng sel rom 姓名 缺少 學生 sid

s:學生表
學生ID
姓名

k:課程表
課程ID
課程名稱

c:成績表
成績ID
學生ID
課程ID
成績

1、查 各門課程中缺少考試成績的學生
select a.sname,a.kname from (select * from s,k ) a left join c on c.sid=a.sid and c.kid=a.kid where c.chengji is null

sql 面試題