文档详情

SQL基础-查询.ppt

发布:2017-11-23约3.27万字共48页下载文档
文本预览下载声明
* 1 select * from teacher a where exists(select * from course b where a.tno = b.tno) 2 select * from teacher a where not exists(select * from course b where a.tno = b.tno) 3 select tname from student where exists(select sno from score sc where s.sno = sc.sno and cno = 6-166) * 1 select * from score order by degree desc 2 select * from score order by cno ,degree desc * 1 select * from score order by degree desc 2 select * from score order by cno ,degree desc * 1 select count(*) from student where class = ‘020104’ 2 select max(degree),min(degree) from score 3 select max(degree) - min(degree) from score 4 select avg(degree) from score where sno = ‘2002010401’ 5 select sno from score group by sno having count(*) 3 * 1 select count(*) from student where class = ‘020104’ * 1 select count(*) from student where class = ‘020104’ 2 select max(degree),min(degree) from score 3 select max(degree) - min(degree) from score 4 select avg(degree) from score where sno = ‘2002010401’ 5 select sno from score group by sno having count(*) 3 * 1 select count(*) from student where class = ‘020104’ 2 select max(degree),min(degree) from score 3 select max(degree) - min(degree) from score 4 select avg(degree) from score where sno = ‘2002010401’ 5 select sno from score group by sno having count(*) 3 * 1 select count(*) from student where class = ‘020104’ 2 select max(degree),min(degree) from score 3 select max(degree) - min(degree) from score 4 select avg(degree) from score where sno = ‘2002010401’ 5 select sno from score group by sno having count(*) 3 * 1 select count(*) from student where class = ‘020104’ 2 select max(degree),min(degree) from score 3 select max(degree) - min(degree) from score 4 select avg(degree) from score where sno = ‘2002010401’ 5 select sno from score group by sno having count(*) 3 * 1 select count(*) from student where class = ‘020104’ * 1 select count(*) from student where class = ‘020104’ 2 select max(degree),min(degree) from score 3 select max(degree
显示全部
相似文档