写点什么

MySQL 基础知识测试

用户头像
Android架构
关注
发布于: 1 小时前

REMOVE


5?.?哪条 SQL 语句用于在数据库中插入新的数据?


INSERT NEW


ADD RECORD


ADD NEW


INSERT INTO


6?.?通过 SQL,您如何从 "Persons"表中选取 "FirstName" 列?


SELECT Persons.FirstName


SELECT FirstName FROM Persons


EXTRACT FirstName FROM Persons


7?.?通过 SQL,您如何从 "Persons"表中选取所有的列?


SELECT [all] FROM Persons


SELECT Persons


SELECT * FROM Persons


SELECT *.Persons


8?.?通过 SQL,您如何从 "Persons"表中选取 "FirstName" 列的值等于"Peter" 的所有记录?


SELECT [all] FROM Persons WHEREFirstName='P


《Android学习笔记总结+最新移动架构视频+大厂安卓面试真题+项目实战源码讲义》
浏览器打开:qq.cn.hn/FTe 免费领取
复制代码


eter'


SELECT * FROM Persons WHERE FirstName LIKE'Peter'


SELECT [all] FROM Persons WHERE FirstNameLIKE 'Peter'


SELECT * FROM Persons WHERE FirstName='Peter'


9?.?通过 SQL,您如何从 "Persons"表中选取 "FirstName" 列的值以"a" 开头的所有记录?


SELECT * FROM Persons WHERE FirstName LIKE 'a%'


SELECT * FROM Persons WHERE FirstName='a'


SELECT * FROM Persons WHERE FirstName LIKE'%a'


SELECT * FROM Persons WHERE FirstName='%a%'


10?.?请判断下列说法是否正确:当所列出的某个条件为 true 时,OR 运算符会显示记录。当列出的所有条件为 true 时,AND 运算符会显示记录。


正确


错误


11?.?通过 SQL,您如何在表 Persons 中选择 FirstName 等于 Thomas 而 LastName 等于 Carter 的所有记录?


SELECT * FROM Persons WHERE FirstName LIKE'Thomas' AND LastName LIKE 'Carter'


SELECT FirstName='Thomas',LastName='Carter' FROM Persons


SELECT * FROM Persons WHERE FirstName='Thomas' AND LastName='Carter'


12?.?通过 SQL,您如何按字母顺序选取 Persons 表中 LastName 介于 Adams 和 Carter 的所有记录?


SELECT * FROM Persons WHERE LastName BETWEEN 'Adams' AND'Carter'


SELECT * FROM Persons WHERELastName>'Adams' AND LastName<'Carter'


SELECT LastName>'Adams' AND LastName<'Carter'FROM Persons


13?.?哪条 SQL 语句可返回唯一不同的值?


SELECT DIFFERENT


SELECT DISTINCT


SELECT UNIQUE


14?.?哪个 SQL 关键词用于对结果集进行排序?


ORDER


SORT BY


SORT


ORDER BY


15?.?通过 SQL,您如何根据 "FirstName"列降序地从 "Persons" 表返回所有记录?


SELECT * FROM Persons SORT 'FirstName' DESC


SELECT * FROM Persons ORDER BY FirstName DESC


SELECT * FROM Persons ORDER FirstName DESC


SELECT * FROM Persons SORT BY 'FirstName'DESC


16?.?通过 SQL,您如何向 "Persons"表插入新的记录?


INSERT ('Jimmy', 'Jackson') INTO Persons


INSERT VALUES ('Jimmy', 'Jackson') INTOPersons


INSERT INTO Persons VALUES ('Jimmy', 'Jackson')


17?.?通过 SQL,您如何向 "Persons"表中的 "LastName" 列插入"Wilson" ?


INSERT INTO Persons (LastName) VALUES ('Wilson')


INSERT ('Wilson') INTO Persons (LastName)


INSERT INTO Persons ('Wilson') INTOLastName


18?.?您如何把"Persons" 表中 "LastName" 列的 "Gates"改为 "Wilson" ?


MODIFY Persons SET LastName='Wilson' WHERELastName='Gates'


UPDATE Persons SET LastName='Wilson' WHERE LastName='Gates'

用户头像

Android架构

关注

还未添加个人签名 2021.10.31 加入

还未添加个人简介

评论

发布
暂无评论
MySQL基础知识测试