题目
根据SQL标准,修改表的数据结构,下面哪种语句适用?()
A UPDATE
B ALTER
C CHANGE
D SHIFT
第1题
根据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
第2题
根据SQL标准,删除一个表中的记录,下面哪个语句适用?()
A DROP TABLE
B DROP
C DELETE
D ERASE
第3题
根据SQL标准,删除一个表,应该使用下面哪个语句?()
A DELETE TABLE
B DROP TABLE
C DELETE VIEW
D DROP DATABASE
第4题
根据SQL标准,创建一个表,应该使用下面哪个语句?()
A CREATE TABLE
B CREATE INDEX
C CREATE VIEW
D CREATE DATABASE
第5题
根据SQL标准,删除表student中对字段sno的唯一性约束,应该使用下面哪条语句? ()
A drop sno from table student
B alter table student drop sno
C alter table student drop unique(sno)
D alter table student drop sno unique
第6题
A delete from student
B delete all from student
C delete * from student
D drop table student
第7题
根据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
第8题
A copy * from SC1 to SC2
B copy * from SC2 to SC1
C insert into SC2 select * from SC1
D insert into SC1 select * from SC2
第9题
根据SQL标准,查询表student(sno,sname,sex,dept)中所有学生的选修课程数,其中选修记录在表SC(sno,cno,grade)中,两表中sno为关联字段。下面哪条语句合适?()
A select sno,count(cno) from SC
B select sno,count(cno) from student
C select a.sno,count(cno) from student a left outer join SC
D select a.sno,count(cno) from SC left outer join student a
第10题
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)
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!