与WHERE AGE BETWEEN 18 AND 23完全等价的是()
第1题:
对于学生信息表:student(sno,sname,sex,age,dept),能够得到年龄在20岁到22岁之间的学生的姓名和学号的语句是
A.SELECT * FROM student WHERE age BETWEEN 20 AND 22
B.SELECT sname,sno FROM student WHERE age BETWEEN 20 AND 22
C.SELECT sname,sno FROM student WHERE age>=20
D.SELECT sname,sno FROM student WHERE age<=22
第2题:
根据SQL标准,要查询表student中平均年龄age小于21的所在系dept及其平均年龄值,下面哪条语句适用?()
A select dept,avg(age) from student where avg(age)<21
B select dept,avg(age) from student group by dept having avg(age)<21
C select dept,avg(age) from student having avg(age)<21
D select dept,avg(age) from student group by dept where avg(age)<21
第3题:
使用SQL语句将学生表S中年龄(AGE)大于30岁的记录删除,正确的命令是( )。
A.DELETE FOR AGE>30
B.DELETE FROM S WHERE AGE>30
C.DELETE S FOR AGE>30
D.DELETE S WHERE AGE>30
第4题:
根据SQL标准,要查询表student中所有年龄age小于所有学生的平均年龄的记录,下面哪条语句适用?()
A select * from student where age< avg(age)
B select * from student having age< avg(age)
C select * from student a where a.age< (select avg(b.age) from student b)
D select * from student a where (select avg(b.age) from student b ) >= a.age
第5题:
根据SQL标准,下面哪句语句能够找出年龄最小的同学?其中age为学生表student中的年龄字段,sno为学生的学号。()
A select max(age) from student
B select sno from student where age = max(age)
C select sno from student having age = max(age)
D select sno from student a where a.age<= (select min(b.age) from student b)
第6题:
对于学生信息表S(SNUMBER,SNAME,SEX,AGE,DEPT)(STUDENT由学号SN0,姓名SNAME,性别SEX,年龄AGE,所在系DEPT5个属性组成,其中SNUMBER为主码),求年龄20~23岁之间的学生姓名和年龄,正确的语句是( )。
A) SELECT SNAME, AGE FROM S WHERE AGE>20 OR AGE<23
B) SELECT SNAME, AGE FROM S WHERE AGE BETWEEN 20 AND 23
C) SELECT * FROM S WHERE AGE BETWEEN 20 AND 23
D) 以上均不正确
第7题:
根据SQL标准,要修改表student中所有学生的年龄age,使之在原值基础上减一,下面哪个语句适用?()
A update student set age = 1
B update student set age = age - 1
C update age = age -1 from student
D update from student where age = age -1
第8题:
检索所有比“王华”年龄大的学生的姓名、年龄和性别,正确的SELECT语句是______。
A.SELECT SN,AGE,SEX FROM S SHERE AGE>(SELECT AGE FROM S WHERE SN='王华')
B.SELECT SN,AGE,SEX FROM S WHERE SN='王华'
C.SELECT SN,ACE,SEX FROM S WHERE AGE>(SELECT ACE WHERE SN='王华')
D.SELECT SN,ACE,SEX FROM S WHERE ACE>王华 AGE
第9题:
根据SQL标准,下面哪条语句与select min(age) from student等效?()
A select age from student where age >= min(age)
B select distinct age from student where age >= all min(age)
C select distinct a.age from student a where a.age<= any (select distinctb.age from student b)
D select distinct a.age from student a where a.age<= all (select distinct b.age from student b)
第10题:
S(S#,SN,SEX,AGE,DEPT) C(C#,CN) SC(S#,C#,GRADE)其中:S#为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C#为课程号, CN为课程名,GRADE为成绩。检索所有比“王华”年龄大的学生姓名、年龄和性别。正确的SELECT语句是______。
A.SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE FROM S WHERE SN='王华')
B.SELECT SN, AGE, SEX FROM S WHERE SN='王华'
C.SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE WHERE SN='王华')
D.SELECT SN,AGE,SEX FROM S WHERE AGE>王华AGE