当前位置: 首页 > news >正文

芜湖那里帮人做销售网站app界面设计教程

芜湖那里帮人做销售网站,app界面设计教程,外贸公司网站素材,查看网站的外链1、 查询Student表中的所有记录的Sname、Ssex和Class列。select sname,ssex,class fromstudent;2、查询教师所有的单位即不重复的Depart列。select distinct depart fromteacher;3、 查询Student表的所有记录。select * fromstudent;4、 查询Score表中成绩在60到80之间的所有记…1、 查询Student表中的所有记录的Sname、Ssex和Class列。select sname,ssex,class fromstudent;2、查询教师所有的单位即不重复的Depart列。select distinct depart fromteacher;3、 查询Student表的所有记录。select * fromstudent;4、 查询Score表中成绩在60到80之间的所有记录。select * from score where degree60 and degree80;5、 查询Score表中成绩为8586或88的记录。select * from score where degree in (85,86,88);6、 查询Student表中“95031”班或性别为“女”的同学记录。select * from student where class like 95031 or ssex like 女;7、 以Class降序查询Student表的所有记录。select * from student order by class desc;8、 以Cno升序、Degree降序查询Score表的所有记录。select * from score order by cno asc , degree desc;9、 查询“95031”班的学生人数。select count(*) from student group byclass;10、 查询Score表中的最高分的学生学号和课程号。(子查询或者排序)select * from score order by degree desc limit 1;下面这个使用的连接查询select max(degree) fromscore #先写出score的最高分select * from score where degree (select max(degree) fromscore);select sno,cno from score where degree (select max(degree) fromscore);11、 查询每门课的平均成绩。select cno,count(*),avg(degree) from score group by cno having count(*); 多条查询12、查询Score表中至少有5名学生选修的并以3开头的课程的平均分数。select cno,avg(degree) from score where cno like 3-105 and cno like 3%;select * from score group bydegree;select cno,count(*),avg(degree) from score where cno like 3% group by cno having count(*) 5;select cno,count(*),avg(degree) from score where cno like 3% group by cno having count(*) 5;13、查询分数大于70小于90的Sno列。select sno,degree from score where degree70 and degree90;select group_concat(sno) from score where degree70 and degree90;14、查询所有学生的Sname、Cno和Degree列。(多表查询)student.sname,course.cno,score.degreeselect student.sname,course.cno,score.degree fromstudent,course,score;select sname,cno,degree from student join score on student.sno score.sno;15、查询所有学生的Sno、Cname和Degree列。student.sno,course.cname,score.degreeselect student.sno,course.cname,score.degree fromstudent,course,score;select sno,cname,degree from score join course on course.cno score.cno;16、查询所有学生的Sname、Cname和Degree列。student.sname,course.cname,score.degree;select student.sname,course.cname,score.degree fromstudent,course,score;select student.sname,course.cname,score.degree from student,course,score where sname between 李军 and 王丽;select student.sname,cname,degree from student join score on student.sno score.sno join course on course.cno score.cno;17、查询“95033”班学生的平均分。select sno from student where class 95033;select avg(degree) from score where sno in(select sno from student where class 95033);18、查询选修“3-105”课程的成绩高于“109”号同学成绩的所有同学的记录。select degree from score where sno 109 and cno 3-105;select sno,degree from score where degree (select degree from score where sno 109 and cno 3-105);19、查询score中选学多门课程的同学中分数为非最高分成绩的记录。select cno from score where (cno 3-245 and cno 3-105) or (cno 3-245 and cno 6-166) or (cno 3-245 and cno 6-166); 这是个错误的select * from Score a where Sno in (select Sno from Score group by Sno having count(*)1 ) and Degree not in (select max(Degree) from Score b where b.Cno a.Cno)select * from Score a where Sno in (select Sno from Score group by Sno having count(*)1 ) and Degree not in (select max(Degree) from Score a where Sno in (select Sno from Score group by Sno having count(*)1))20、查询成绩高于学号为“109”、课程号为“3-105”的成绩的所有记录。select degree from score where sno 109 and cno 3-105;select * from score where degree (select degree from score where sno 109 and cno 3-105);21、查询和学号为108的同学同年出生的所有学生的Sno、Sname和Sbirthday列。select sbirthday from student where sno 108;select sno,sname,sbirthday from student where sbirthday (select sbirthday from student where sno 108);22、查询“张旭“教师任课的学生成绩(姓名)。select tno from teacher where tname 张旭; #找出教师编号select cno from course where tno (select tno from teacher where tname 张旭); #找出课程编号select sno,degree from score where cno (select cno from course where tno (select tno from teacher where tname 张旭));select student.sno,degree,sname from score join student on score.sno student.sno where student.sno in (select sno from score where cno (select cno from course where tno (select tno from teacher where tname 张旭)));23、查询考计算机导论的学生成绩select cno from course where cname 计算机导论; #找到课程编号3-105select sno,degree from score where cno (select cno from course where cname 计算机导论);24、查询李诚老师教的课程名称select tno from teacher where tname 李诚; ##找到教师编号select cname from course where tno (select tno from teacher where tname 李诚);25、教高等数学的老师是哪个系的select tno from course where cname 高等数学;select depart from teacher where tno (select tno from course where cname 高等数学);26、查询选修某课程的同学人数多于5人的教师姓名。select cno,count(*) from score group by cno having count(*)5; #找出课程编号select tno from course where cno (select cno from score group by cno having count(*)5);select tname from teacher where tno (select tno from course where cno (select cno from score group by cno having count(*)5));27、查询95033班和95031班全体学生的记录。select * from student group by class having count(*);select * from student order by class desc;28、查询成绩表中存在有85分以上成绩的课程Cno.select cno,degree from score where degree85;29、查询出“计算机系“教师所教课程的成绩表。select tno,tname from teacher where depart 计算机系#查出教师编号select cno from course where tno in (select tno from teacher where depart 计算机系); #查出课程编号select sno,cno,degree from score where cno in (select cno from course where tno in (select tno from teacher where depart 计算机系));30、查询选修编号为“3-105”且成绩高于选修编号为“3-245”课程的同学的 Cno、Sno和Degree.select max(degree) from score where cno 3-245; #先把选修编号为3-245课程的同学的最高成绩查询出来select cno,sno,degree from score where cno 3-105 and degree (select max(degree) from score where cno 3-245);31、查询所有教师和同学的name、sex和birthday.select tname as name,tsex as sex,tbirthday as birthday fromteacherunionselect sname,ssex,sbirthday fromstudent;32、查询所有“女”教师和“女”同学的name、sex和birthday.select tname as name,tsex as sex,tbirthday as birthday from teacher where tsex 女unionselect sname,ssex,sbirthday from student where ssex 女;33、查询所有成绩比3-105课程平均成绩低的同学的成绩表。select avg(degree) from score where cno 3-105;select degree from score where degree (select avg(degree) from score where cno 3-105);34、查询所有任课教师的Tname和Depart.select tname,depart fromteacher;35、查询所有未讲课的教师的Tname和Depart.select tno from course group bytno; #找出有课的老师的编号select tname,depart from teacher where not exists(select tno from course group bytno);36、查询至少有2名男生的班号。#####################################################3select ssex,class from student where ssex 男 group byclass;select class from student where exists ((select ssex,class from student where ssex 男 group by class) * 2);37、查询Student表中不姓“王”的同学记录。select sname from student where sname like 王%select sname from student where sname not in (select sname from student where sname like 王%);38、查询Student表中每个学生的姓名和年龄。selectsname,select floor(datediff(curdate(),birthday)/365.2422)39、查询Student表中最大和最小的Sbirthday日期值。select max(sbirthday) as 最大日期 , min(sbirthday) as 最小日期 fromstudent;update student set sbirthday 1995-07-11 where sno 108;update student set sbirthday 1820-05-01 where sno 105;40、以班号和年龄从大到小的顺序查询Student表中的全部记录。select * from student order by class desc,sbirthday desc;41、查询“男”教师及其所上的课程。select tno from teacher where tsex 男;select cname from course where tno in (select tno from teacher where tsex 男);42、查询最高分同学的Sno、Cno和Degree列。select max(degree) fromscoreselect score.sno,cno,degree fromstudentjoinscoreon student.sno score.snowhere degree (select max(degree) fromscore);43、查询和“李军”同性别的所有同学的Sname.select ssex from student where sname 李军;select sname from student where ssex (select ssex from student where sname 李军);44、查询和“李军”同性别并同班的同学Sname.select class from student where sname 李军;select sname from student where ssex (select ssex from student where sname 李军) and class (select class from student where sname 李军);45、查询所有选修“计算机导论”课程的“男”同学的成绩表。select cno from course where cname 计算机导论; #根据课程表找到课程编号select sno from score where cno (select cno from course where cname 计算机导论); #根据课程编号找到成绩表里面的学生编号select sname from student where sno in (select sno from score where cno (select cno from course where cname 计算机导论)) and ssex 男;
http://www.huolong8.cn/news/202422/

相关文章:

  • 威海网站建设哪一家wordpress微信授权登录界面
  • 怎样为公司做网站北京海淀网站建设公司
  • 数据展示网站模板免费网站备案号码
  • 做软件网站做网站是否过时了
  • 校园服装网站建设演示文稿wordpress 电话登记插件
  • 经典网站欣赏建设网站的标语
  • 湖南智能网站建设福州高端网站建设服务网络公司
  • 福建省建设工程信息网站客户网站建设洽谈方案
  • 中宁网站建设青岛室内设计学校
  • 做一网站需要哪些语言绍兴网络公司网站建设
  • 手机网站给一个wordpress 多人编辑器
  • 深圳门户网站做网站建设给人销售
  • 网站不用下载免费软件网站可以做什么
  • 服务器ip做网站衡阳网站优化
  • 星级酒店网站建设公司做网站什么空间好
  • 广告费内包括网站建设wordpress插件 二次开放
  • 建设网站需要什么技术去掉网站侧边栏
  • 给网站栏目页做反链好吗网站做一年了没做301
  • 石家庄求做网站网速测速
  • 南京有哪些知名的网站建设哈尔滨网站开发公司排行榜
  • 临沂培训学校网站建设西安比较好的软件公司
  • 法律网站模板有什么平台做网站比较好
  • 网站的源码网上开店网站
  • 网站建设制作设计珠海微信 wordpress
  • 安徽网站建设推荐-晨飞网络如何做电影网站
  • 佛山企业网站排名煎蛋网站用什么做的
  • 山西高端建设网站公司网站免费申请
  • 中山市网站制作莱芜职业技术学院
  • 做app网站需要什么短网址生成站长工具
  • 建视频网站多少钱沧州做企业网站