题号 #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;


你可能感兴趣的试题

A.delete
B.update
C.insert
D.select
A.insert
B.update
C.delete
D.select
找试题 · 找答案 · 找资料 在线模考