简答题
MySQL数据程序设计
题号 #3613542
SQL命令题
(一)有student表如下
1.查询表中所有学生的信息。
在所有学生的英语分数上加10分特长分。
查询姓名为王五的学生成绩
查询英语成绩大于90分的同学
查询英语分数在 80-90之间的同学。
查询数学分数为89,90,91的同学。
对数学成绩排序后输出名字和数学成绩。
参考答案
暂无
答案解析
查询表中所有学生的信息。
select id,name,chinese,english,math from student;
select * from student;
在所有学生的英语分数上加10分特长分。
select name,english+10 from student;
查询姓名为王五的学生成绩
select * from student where name='王五';
查询英语成绩大于90分的同学
select * from student where english>90;
查询英语分数在 80-90之间的同学。
select * from student where english>80 and english<90;
select * from student where english between 80 and 90;
查询数学分数为89,90,91的同学。
select * from student where math=80 or math=90 or math=91;
select * from student where math in(80,90,91);
对数学成绩排序后输出名字和数学成绩。
select name,math from student order by math;