上诉为数据表
答:
1
select * from student right join (
select t1.sid,class1,class2 from
(select sid,score as class1 from sc where cid=‘01’)as t1,
(select sid,score as class2 from sc where cid=‘02’)as t2
where t1.sid=t2.sid and t1.class1>t2.class2
)r
on student.sid=r.sid;
学习到的知识:
1.连接,外连接,左右连接,左右外连接
2.如何用查询建立表
1.1
select * from (select * from sc where sc.cid=‘01’)t1,
(select * fr