W3school 在线教程
HTML 系列教程
浏览器脚本
服务器脚本
编程教程
XML 系列教程
建站手册
参考手册
W3School 测验
HTML 测验
HTML5 测验
XHTML 测验
CSS 测验
XML 测验
JavaScript 测验
jQuery 测验
SQL 测验
ASP 测验
PHP 测验
建站手册
网站构建
万维网联盟 (W3C)
浏览器信息
网站品质
语义网
职业规划
网站主机
关于 W3School
帮助 W3School
01.SQL 指的是?
Strong Question Language
Structured Question Language
Structured Query Language
02.哪个 SQL 语句用于从数据库中提取数据?
EXTRACT
SELECT
OPEN
GET
03.哪条 SQL 语句用于更新数据库中的数据?
MODIFY
SAVE AS
UPDATE
SAVE
04.哪条 SQL 语句用于删除数据库中的数据?
COLLAPSE
DELETE
REMOVE
05.哪条 SQL 语句用于在数据库中插入新的数据?
INSERT NEW
ADD RECORD
ADD NEW
INSERT INTO
06.通过 SQL,您如何从 "Persons" 表中选取 "FirstName" 列?
SELECT Persons.FirstName
SELECT FirstName FROM Persons
EXTRACT FirstName FROM Persons
07.通过 SQL,您如何从 "Persons" 表中选取所有的列?
SELECT [all] FROM Persons
SELECT Persons
SELECT * FROM Persons
SELECT *.Persons
08.通过 SQL,您如何从 "Persons" 表中选取 "FirstName" 列的值等于"Peter" 的所有记录?
SELECT [all] FROM Persons WHERE FirstName='Peter'
SELECT * FROM Persons WHERE FirstName LIKE 'Peter'
SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'
SELECT * FROM Persons WHERE FirstName='Peter'
09.通过 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 WHERE LastName>'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') INTO Persons
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') INTO LastName
18.您如何把 "Persons" 表中 "LastName" 列的 "Gates" 改为 "Wilson" ?
MODIFY Persons SET LastName='Wilson' WHERE LastName='Gates'
UPDATE Persons SET LastName='Wilson' WHERE LastName='Gates'
UPDATE Persons SET LastName='Wilson' INTO LastName='Gates'
MODIFY Persons SET LastName='Wilson' INTO LastName='Gates'
19.通过 SQL,您如何在 "Persons" 表中删除 "FirstName" 等于 "Fred" 的纪录?
DELETE FROM Persons WHERE FirstName = 'Fred'
DELETE FirstName='Fred' FROM Persons
DELETE ROW FirstName='Fred' FROM Persons
20.通过 SQL,您如何返回 "Persons" 表中记录的数目?
SELECT COLUMNS() FROM Persons
SELECT COLUMNS(*) FROM Persons
SELECT COUNT() FROM Persons
SELECT COUNT(*) FROM Persons