SQL Quiz Results
SQL Quiz Results
Score: 15 of 25
60% Correct:
Question 1:
What does SQL stand for?
Structured Query Language
Structured Question Language
Strong Question Language
Question 2:
Which SQL statement is used to extract data from a database?
SELECT
GET
EXTRACT
OPEN
Question 3:
Which SQL statement is used to update data in a database?
UPDATE
MODIFY
SAVE AS
SAVE
Question 4:
Which SQL statement is used to delete data from a database?
DELETE
REMOVE
COLLAPSE
Question 5:
Which SQL statement is used to insert new data in a database?
INSERT INTO
ADD RECORD
ADD NEW
INSERT NEW
Question 6:
With SQL, how do you select a column named "FirstName" from a table
named "Persons"?
SELECT Persons.FirstName
EXTRACT FirstName FROM Persons
SELECT FirstName FROM Persons
Question 7:
With SQL, how do you select all the columns from a table named
"Persons"?
SELECT * FROM Persons
SELECT *.Persons
SELECT Persons
SELECT [all] FROM Persons
Question 8:
With SQL, how do you select all the records from a table named
"Persons" where the value of the column "FirstName" is "Peter"?
SELECT * FROM Persons WHERE FirstName='Peter'
SELECT * FROM Persons WHERE FirstName<>'Peter'
SELECT [all] FROM Persons WHERE FirstName='Peter'
SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'
Question 9:
With SQL, how do you select all the records from a table named
"Persons" where the value of the column "FirstName" starts with an
"a"?
SELECT * FROM Persons WHERE FirstName='%a%'
SELECT * FROM Persons WHERE FirstName='a'
SELECT * FROM Persons WHERE FirstName LIKE '%a'
SELECT * FROM Persons WHERE FirstName LIKE 'a%'
Question 10:
The OR operator displays a record if ANY conditions listed are true. The
AND operator displays a record if ALL of the conditions listed are true
True
False
Question 11:
With SQL, how do you select all the records from a table named
"Persons" where the "FirstName" is "Peter" and the "LastName" is
"Jackson"?
SELECT * FROM Persons WHERE FirstName='Peter' AND
LastName='Jackson'
SELECT * FROM Persons WHERE FirstName<>'Peter' AND
LastName<>'Jackson'
SELECT FirstName='Peter', LastName='Jackson' FROM Persons
Question 12:
With SQL, how do you select all the records from a table named
"Persons" where the "LastName" is alphabetically between (and
including) "Hansen" and "Pettersen"?
SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND
'Pettersen'
SELECT * FROM Persons WHERE LastName>'Hansen' AND
LastName<'Pettersen'
SELECT LastName>'Hansen' AND LastName<'Pettersen' FROM Persons
Question 13:
Which SQL statement is used to return only different values?
SELECT DISTINCT
SELECT DIFFERENT
SELECT UNIQUE
Question 14:
Which SQL keyword is used to sort the result-set?
ORDER BY
SORT BY
ORDER
SORT
Question 15:
With SQL, how can you return all the records from a table named
"Persons" sorted descending by "FirstName"?
SELECT * FROM Persons SORT BY 'FirstName' DESC
SELECT * FROM Persons ORDER FirstName DESC
SELECT * FROM Persons SORT 'FirstName' DESC
SELECT * FROM Persons ORDER BY FirstName DESC
Question 16:
With SQL, how can you insert a new record into the "Persons" table?
INSERT ('Jimmy', 'Jackson') INTO Persons
INSERT VALUES ('Jimmy', 'Jackson') INTO Persons
INSERT INTO Persons VALUES ('Jimmy', 'Jackson')
Question 17:
With SQL, how can you insert "Olsen" as the "LastName" in the
"Persons" table?
INSERT INTO Persons ('Olsen') INTO LastName
INSERT INTO Persons (LastName) VALUES ('Olsen')
INSERT ('Olsen') INTO Persons (LastName)
Question 18:
How can you change "Hansen" into "Nilsen" in the "LastName" column
in the Persons table?
MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'
UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'
UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'
MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen
Question 19:
With SQL, how can you delete the records where the "FirstName" is
"Peter" in the Persons Table?
DELETE ROW FirstName='Peter' FROM Persons
DELETE FROM Persons WHERE FirstName = 'Peter'
DELETE FirstName='Peter' FROM Persons
Question 20:
With SQL, how can you return the number of records in the "Persons"
table?
SELECT COUNT(*) FROM Persons
SELECT NO(*) FROM Persons
SELECT LEN(*) FROM Persons
SELECT COLUMNS(*) FROM Persons
Question 21:
What is the most common type of join?
JOINED TABLE
INSIDE JOIN
INNER JOIN
JOINED
Question 22:
Which operator is used to select values within a range?
BETWEEN
WITHIN
RANGE
Question 23:
The NOT NULL constraint enforces a column to not accept null values.
True
False
Question 24:
Which operator is used to search for a specified pattern in a column?
FROM
GET
LIKE
Question 25:
Which SQL statement is used to create a table in a database?
CREATE DATABASE TABLE
CREATE DATABASE TAB
CREATE DB
CREATE TABLE
aaaaacaadaaaaadcbcbac aac d
SQL Quiz Results
Score: 15 of 25
60% Correct:
Question 1:
What does SQL stand for?
SELECT Your answer
GET
EXTRACT
OPEN
Question 3:
Which SQL statement is used to update data in a database?
UPDATE Your answer
MODIFY
SAVE AS
SAVE
Question 4:
Which SQL statement is used to delete data from a database?
DELETE Your answer
REMOVE
COLLAPSE
Question 5:
Which SQL statement is used to insert new data in a database?
Question 6:
With SQL, how do you select a column named "FirstName" from a table
named "Persons"?
Question 7:
With SQL, how do you select all the columns from a table named "Persons"?
Question 8:
With SQL, how do you select all the records from a table named "Persons"
where the value of the column "FirstName" is "Peter"?
Question 10:
The OR operator displays a record if ANY conditions listed are true. The AND
operator displays a record if ALL of the conditions listed are true
True Your answer
False
Question 11:
With SQL, how do you select all the records from a table named "Persons"
where the "FirstName" is "Peter" and the "LastName" is "Jackson"?
Question 13:
Which SQL statement is used to return only different values?
Question 14:
Which SQL keyword is used to sort the result-set?
Question 15:
With SQL, how can you return all the records from a table named "Persons"
sorted descending by "FirstName"?
Question 16:
With SQL, how can you insert a new record into the "Persons" table?
Question 17:
With SQL, how can you insert "Olsen" as the "LastName" in the "Persons"
table?
Question 18:
How can you change "Hansen" into "Nilsen" in the "LastName" column in the
Persons table?
MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen' Your
answer
UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'
UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen' Correct
answer
MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen
Question 19:
With SQL, how can you delete the records where the "FirstName" is "Peter" in
the Persons Table?
Question 20:
With SQL, how can you return the number of records in the "Persons" table?
Question 21:
What is the most common type of join?
Question 22:
Which operator is used to select values within a range?
BETWEEN Your answer
WITHIN
RANGE
Question 23:
The NOT NULL constraint enforces a column to not accept null values.
True Your answer
False
Question 24:
Which operator is used to search for a specified pattern in a column?
FROM Your answer
GET
LIKE Correct answer
Question 25:
Which SQL statement is used to create a table in a database?
CREATE DATABASE TABLE Your answer
CREATE DATABASE TAB
CREATE DB
CREATE TABLE Correct answer