根据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
第1题:
根据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)
第2题:
根据SQL标准,删除一个表中的记录,下面哪个语句适用?()
A DROP TABLE
B DROP
C DELETE
D ERASE
第3题:
将学生表STUDENT中的学生年龄(字段名是AGE)增加1岁,应该使用的SQL命令是UPDATE STUDENT。
第4题:
根据SQL标准,要删除表student中所有数据,但不将表student的定义一起删除,下面哪个语句可以适用?()
A delete from student
B delete all from student
C delete * from student
D drop table student
第5题:
根据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