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

做旅游计划上哪个网站如何制作手机网页链接

做旅游计划上哪个网站,如何制作手机网页链接,discuz,网络营销的广告形式有哪些实验6.1 对学生实验数据库(stuexpm)的学生信息表(StudentInfo)和成绩信息表(Scorelnfo)进行信息查询,编写和调试查询语句的代码,完成以下操作 (1)使用两种方式查询Studentlnfo表的所有记录 ①使用列名表。 ② 使用*. use stuexpm;select StudentID,Name,Sex,Birthday,Specia…

实验6.1

对学生实验数据库(stuexpm)的学生信息表(StudentInfo)和成绩信息表(Scorelnfo)进行信息查询,编写和调试查询语句的代码,完成以下操作

(1)使用两种方式查询Studentlnfo表的所有记录
①使用列名表。
② 使用*.

use stuexpm;select StudentID,Name,Sex,Birthday,Speciality,Address from studentinfo;
select * from studentinfo;


(2)查询Scorelnfo表的所有记录。

select * from scoreinfo;


(3)查询高等数学成绩低于90分的成绩信息,

select *
from scoreinfo
where CourseID='8001' and Grade<90;

(4)使用两种方式查询地址为上海市浦东区和成都市锦江区的学生的信息
① 使用 IN 关键字。
② 使用 OR 关键字。

select *
from studentinfo
where Address in('上海市浦东区','成都市锦江区');select *
from studentinfo
where Address='上海市浦东区' or Address='成都市锦江区';


(5)使用两种方式查询分数为90~95分的成绩信息。
①使用BETWEEN AND 关键字
②使用AND关键字和比较运算符

select *
from scoreinfo
where Grade between 90 and 95;select *
from scoreinfo
where Grade>=90 and Grade<=95;


(6)通过两种方式查询地址是北京的学生信息。
① 使用 LIKE 关键字。
② 使用 REGEXP 关键字。

select *
from studentinfo
where Address like '北京%';select *
from studentinfo
where Address regexp '^北京';


(7)查询每个专业有多少人。

select Speciality,count(*) as '人数'
from studentinfo
group by Speciality;


(8)查询高等数学的平均成绩、最高分和最低分

select avg(Grade) as average,max(Grade) as highest,min(Grade) as lowest
from scoreinfo
where CourseID='8001';


(9)将英语成绩按从高到低的顺序排列。

select *
from scoreinfo
where CourseID='1201'
order by Grade desc ;


(10)通过两种方式查询英语成绩第3~5名的信息
① 使用 LIMIT offset row count 格式。
② 使用 LIMIT row_count OFFSET offset 格式。


select *
from scoreinfo
where CourseID='1201'
order by Grade desc
limit 2 offset 2;select *
from scoreinfo
where CourseID='1201'
order by  Grade desc
limit 2 offset 2;

实验6.2

对学生实骏数据库(s1uexpm)的学生信息表(Studentlnfo)和成绩信息表(Scoreinin)行信息查询,编写和调试查询语句的代码,完成以下操作。
(1)对学生信息表和成绩信息表进行交叉连接,观察所有的可能组合

select *
from studentinfo,scoreinfo;


(2)查询每个学生选修课程的情况
①使用INNER JOIN 的显式语法结构。
②使用WHERE子句定义连接条件的隐式语法结构。

select s.StudentID,s.Name,s.Sex,s.Birthday,s.Speciality,s.Address,sc.Grade,sc.CourseID
from studentinfo s
inner join scoreinfo sc on s.StudentID=sc.StudentID;select s.StudentID,s.Name,s.Sex,s.Birthday,s.Speciality,s.Address,sc.Grade,sc.CourseID
from studentinfo s,scoreinfo sc
where s.StudentID=sc.StudentID;


(3)采用自然连接查询每个学生选修课程的情况。

select s.StudentID,s.Name,s.Sex,s.Birthday,s.Speciality,s.Address,sc.Grade,sc.CourseID
from studentinfo s
natural join scoreinfo sc;


(4)查询源程不同、成绩相同的学生的学号、课程号和成绩。
①使用INNE JOIN的显式语法结构。
②使用WHERE子旬定义连接条件的隐式语法结构,

select a.StudentID,a.CourseID,a.Grade
from scoreinfo a
inner join scoreinfo b
on a.Grade=b.Grade and a.StudentID<>b.StudentID;select a.StudentID,a.CourseID,a.Grade
from scoreinfo a,scoreinfo b
where a.Grade=b.Grade and a.StudentID<>b.StudentID;


(5)查询选修1004课程的学生的姓名、性别和成绩

select s.Name,s.Sex,sc.Grade
from studentinfo s
inner join scoreinfo sc on s.StudentID=sc.StudentID
where sc.CourseID='1004';


(6)查询逸修了8001课程且为计算机专业学生的姓名及成绩,查出的成绩按降序排列

select s.Name,sc.Grade
from studentinfo s
inner join scoreinfo sc on s.StudentID=sc.StudentID
where sc.CourseID='8001' and s.Speciality='计算机'
order by sc.Grade desc;


(7)查御地址为上海市浦东区的学生的姓名专业、课程号和成绩

select s.Name,s.Speciality,sc.CourseID,sc.Grade
from studentinfo s
inner join scoreinfo sc on s.StudentID=sc.StudentID
where s.Address='上海市浦东区';


(8)查询8001课程的成绩高于4002课程成绩的学生。


select s.StudentID,s.Name,sc1.Grade as Grade_8001,sc2.Grade as Grade_4002
from scoreinfo sc1
inner join scoreinfo sc2 on sc1.StudentID=sc2.StudentID
inner join studentinfo s on s.StudentID=sc1.StudentID
where sc1.CourseID='8001' and sc2.CourseID='4002' and sc1.Grade>sc2.Grade;

http://www.yayakq.cn/news/686006/

相关文章:

  • 做网站的公司一般怎么培训销售线上广告
  • 本地旅游网站模版做网站有哪些导航条
  • wordpress仿微信公众号北京网站建设公司网站优化资讯
  • 中元建设网站58同城枣庄网站建设
  • 做数据表格的网站深圳建设网站速成班
  • 湄潭建设局官方网站怎么制作网站视频播放器
  • 企业免费建站软件wordpress主页显示博客
  • 公众号江苏建设信息网站仿豆瓣WordPress主题
  • 网站导航栏网站建设工作的作用
  • 衡水网站推广的网络公司网站域名和邮箱域名解析
  • 襄阳网站建设制作费用企业网站用什么技术做
  • 网站备案什么注销seo网络优化
  • 优秀的定制网站建设公司如何网站关键词优化
  • wordpress网站怎么进去网站建设公司dz000
  • 陕西建设网综合服务中心网站没经验可以做电商运营吗
  • 泰安企业网站建设公司企业门户网站管理要求
  • 做网站领券收佣金辽宁网站开发
  • 58同城网站建设深圳丽丽亚icp备案查询怎么查询
  • 中为网站建设网站布局模板
  • 苏州吴江太湖新城建设局网站能免费建网站吗
  • 个人网站购买seo中国是什么
  • 昆山网站推广灵犀科技 高端网站建设背景图
  • 专业网站是什么意思石家庄网站排名
  • 上海稼禾建设装饰集团网站让别人做网站多久开始注册域名
  • 做网站有什么html页面生成器
  • 最好的网站建设本地写wordpress
  • 哈尔滨专业网站营销学生个人网页成品
  • 网站制作建设哪家公司好模板网站怎么修改
  • 网站建设課程做外链一般都用网站首页吗
  • 网站建设推广唯心cidun8网站改版的好处