1、SQL 是什麼的縮寫?
A. Strong Question Language
B. Structured Question Language
C. Structured Query Language
2、SQL中用來查詢資料的指令是?
A. EXTRACT
B. SELECT
C. OPEN
D. GET
3、SQL中用來更新資料的指令是?
A. MODIFY
B. SAVE AS
C. UPDATE
D. SAVE
4、SQL中用來刪除資料的指令是?
A. COLLAPSE
B. DELETE
C. REMOVE
5、SQL中用來新增資料的指令是?
A. INSERT NEW
B. ADD RECORD
C. ADD NEW
D. INSERT INTO
6、如何使用SQL從 “Persons” 資料表中查詢所有 “FirstName” 欄位的資料?
A. SELECT Persons.FirstName
B. SELECT FirstName FROM Persons
C. EXTRACT FirstName FROM Persons
7、如何使用SQL從 “Persons” 資料表中查詢所有的資料?
A. SELECT [all] FROM Persons
B. SELECT Persons
C. SELECT * FROM Persons
D. SELECT *.Persons
8、 如何使用SQL從 “Persons” 資料表中查詢所有 “FirstName” 等於 “Peter” 的資料?
A. SELECT [all] FROM Persons WHERE FirstName=’Peter’
B. SELECT * FROM Persons WHERE FirstName LIKE ‘Peter’
C. SELECT [all] FROM Persons WHERE FirstName LIKE ‘Peter’
D. SELECT * FROM Persons WHERE FirstName=’Peter’
9、如何使用SQL從 “Persons” 資料表中查詢所有 “FirstName” 欄位中 “a” 開頭的資料?
A. SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
B. SELECT * FROM Persons WHERE FirstName=’a’
C. SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
D. SELECT * FROM Persons WHERE FirstName=’%a%’
10、OR運算中只要有一個運算元是true,就會顯示資料;AND運算中所有運算元都是true,才會顯示資料。
A. 正確
B. 錯誤
11、如何使用SQL從 “Persons” 資料表中查詢 “FirstName” 等於 “Thomas” 且 “LastName” 等於 “Carter” 的資料?
A. SELECT * FROM Persons WHERE FirstName LIKE ‘Thomas’ AND LastName LIKE ‘Carter’
B. SELECT FirstName=’Thomas’, LastName=’Carter’ FROM Persons
C. SELECT * FROM Persons WHERE FirstName=’Thomas’ AND LastName=’Carter’
12、如何使用SQL從 “Persons” 資料表中查詢 “LastName” 介於 “Adams” 和 “Carter” 的所有資料?
A. SELECT * FROM Persons WHERE LastName BETWEEN ‘Adams’ AND ‘Carter’
B. SELECT * FROM Persons WHERE LastName>’Adams’ AND LastName<‘Carter’ SELECT
C. LastName>’Adams’ AND LastName<‘Carter’ FROM Persons
13、SQL查詢時如何讓查詢的資料不重複?
A. SELECT DIFFERENT
B. SELECT DISTINCT
C. SELECT UNIQUE
14、在SQL中排序資料的指令是?
A. ORDER
B. SORT BY
C. SORT
D. ORDER BY
15、如何使用SQL查詢資料後根據 “FirstName” 欄位由大到小排序資料?
A. SELECT * FROM Persons SORT ‘FirstName’ DESC
B. SELECT * FROM Persons ORDER BY FirstName DESC
C. SELECT * FROM Persons ORDER FirstName DESC
D. SELECT * FROM Persons SORT BY ‘FirstName’ DESC
16、如何對 “Persons” 資料表新增一筆資料?
A. INSERT (‘Jimmy’, ‘Jackson’) INTO Persons
B. INSERT VALUES (‘Jimmy’, ‘Jackson’) INTO Persons
C. INSERT INTO Persons VALUES (‘Jimmy’, ‘Jackson’)
17、如何對 “Persons” 資料表新增一筆只記錄 “LastName” 等於 “Wilson” 的資料?
A. INSERT INTO Persons (LastName) VALUES (‘Wilson’)
B. INSERT (‘Wilson’) INTO Persons (LastName)
C. INSERT INTO Persons (‘Wilson’) INTO LastName
18、如何把 “Persons” 資料表中 “LastName” 為 “Gates” 的紀錄改為 “Wilson”?
A. MODIFY Persons SET LastName=’Wilson’ WHERE LastName=’Gates’
B. UPDATE Persons SET LastName=’Wilson’ WHERE LastName=’Gates’
C. UPDATE Persons SET LastName=’Wilson’ INTO LastName=’Gates’
D. MODIFY Persons SET LastName=’Wilson’ INTO LastName=’Gates’
19、如何刪除 “Persons” 資料表中 “FirstName” 等於 “Fred” 的紀錄?
A. DELETE FROM Persons WHERE FirstName = ‘Fred’
B. DELETE FirstName=’Fred’ FROM Persons
C. DELETE ROW FirstName=’Fred’ FROM Persons
20、如何計算 “Persons” 資料表中有多少筆紀錄?
A. SELECT COLUMNS() FROM Persons
B. SELECT COLUMNS() FROM Persons SELECT COUNT() FROM Persons SELECT COUNT() FROM Persons