查询学科01比02成绩高的信息
select * from sc s1
left join sc s2 on s1.SId = s2.SId
where s1.CId = '01' and s2.CId = '02' and s1.score > s2.score
直接同表关联,然后进行条件筛选
查询学科01比02成绩高的信息
select * from sc s1
left join sc s2 on s1.SId = s2.SId
where s1.CId = '01' and s2.CId = '02' and s1.score > s2.score
直接同表关联,然后进行条件筛选