题号 #2322172

有student表如下
Id

Name

chinese

english

math

1

王五

89

87

76

2

李四

67

78

76

查询表中所有学生的信息。
在所有学生的英语分数上加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;

你可能感兴趣的试题

A.fulltext index       
B.only  index   
C.unique  index        
D.index
A.INSERT     
B.UPDATE    
C.DELETE    
D.SELECT
找试题 · 找答案 · 找资料 在线模考