计算机二级MySQL考试项目导向学习的试题及答案
姓名:____________________
一、单项选择题(每题2分,共10题)
1.MySQL是一种什么类型的数据库管理系统?
A.文件系统数据库
B.关系型数据库
C.面向对象数据库
D.分布式数据库
2.以下哪个是MySQL中的数据类型?
A.String
B.Integer
C.Float
D.Alloftheabove
3.在MySQL中,如何创建一个名为“students”的表,包含“id”和“name”两个字段?
A.CREATETABLEstudents(idINT,nameVARCHAR(50));
B.CREATETABLEstudents(id,name);
C.CREATETABLEstudents(idINT,nameVARCHAR);
D.CREATETABLEstudents(idINT,nameVARCHAR(50),idINT);
4.在MySQL中,如何查询“students”表中所有学生的姓名?
A.SELECTnameFROMstudents;
B.SELECTnameASStudentNameFROMstudents;
C.SELECT*FROMstudentsWHEREname;
D.SELECTnameASStudentNameFROMstudentsWHEREname;
5.在MySQL中,如何删除名为“students”的表?
A.DROPTABLEstudents;
B.DELETETABLEstudents;
C.DROPstudents;
D.DELETEstudents;
6.在MySQL中,如何更新“students”表中名为“John”的学生的姓名为“JohnDoe”?
A.UPDATEstudentsSETname=JohnDoeWHEREname=John;
B.UPDATEstudentsSETname=JohnDoeWHEREname=John;
C.UPDATEstudentsSETname=JohnDoeWHEREname=JohnDoe;
D.UPDATEstudentsSETname=JohnDoeWHEREname=JohnDoe;
7.在MySQL中,如何插入一条新的记录到“students”表中?
A.INSERTINTOstudents(id,name)VALUES(1,John);
B.INSERTINTOstudents(id,name)VALUES(1,John);
C.INSERTINTOstudents(id,name)VALUES(1,John);
D.INSERTINTOstudents(id,name)VALUES(1,JohnDoe);
8.在MySQL中,如何删除“students”表中名为“John”的学生的记录?
A.DELETEFROMstudentsWHEREname=John;
B.DELETEFROMstudentsWHEREname=John;
C.DELETEstudentsWHEREname=John;
D.DELETEFROMstudentsWHEREname=JohnDoe;
9.在MySQL中,如何将“students”表中的所有记录的姓名字段值更改为空字符串?
A.UPDATEstudentsSETname=;
B.UPDATEstudentsSETname=NULL;
C.UPDATEstudentsSETname=;
D.UPDATEstudentsSETname=;
10.在MySQL中,如何查询“students”表中年龄大于20岁的学生姓名?
A.SELECTnameFROMstudentsWHEREage20;
B.SELECTnameFROMstudentsWHEREage20;
C.SELECTnameFROMstudentsWHEREage20;
D.SELECTnameFROMstudentsWHEREage20;
二、多项选择题(每题3分,共10题)
1.MySQL数据库支持以下哪些存储引擎?
A.MyISAM
B.InnoDB
C.Memory
D.