wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

A2 Computing SQL

Total questions: 17

Worksheet time: 13mins

Name
Class
Date
1.
What word is missing from the line below?
SELECT *
_______ CUSTOMER;
a)
FROM
b)
WHERE
c)
SELECT
d)
ORDER BY
2.
What is the purpose of  *?
a)
Selects ALL fields from the table
b)
Selects only the first field in the table
c)
Selects the last field in the table
d)
Shows only the first row in the table
3.
To join a table, connect the ___________ of one table to the ___________ of the other.
a)
primary key, foreign key
b)
group by clause, primary key
c)
filtered by, foreign key
d)
aggregate function, where clause
4.
Return only the customers who have ER anywhere in their last name. 
a)
last_name LIKE "%er%"
b)
last_name = "%er"
c)
last_name = "%er%"
d)
last_name LIKE "%er"
5.
AVG, COUNT, MAX, MIN and SUM are known as what?
a)
Aggregate functions
b)
Wildcard filters
c)
Subqueries
d)
Calculated field
6.
Which word allows you to add more than one filter to a SQL query?
a)
AND
b)
BETWEEN
c)
LIKE
d)
EQUALS
7.

Which query would return the fields Name and Form?

a)

SELECT Name, Set FROM Pupils

b)

SELECT Name, Group FROM Pupils

c)

SELECT Name, Form FROM Pupils

d)

SELECT Name, Gender FROM Pupils

8.
What does integrity control consist of?
a)
Constraints
b)
Tables
c)
Cells
d)
None of the above
9.
What does integrity control protect the database from?
a)
Inconsistency
b)
Duplication
c)
Corruption
d)
Deletion
10.
What does the SQL DDL allow?
a)
objects to be created and destroyed
b)
objects to be removed
c)
objects to be modified
11.
Does ALTER TABLE let you modify a table?
a)
Yes
b)
No
12.
Does COMMIT end or start a transaction?
a)
Start
b)
End
13.
Which statement do you use to give other users privileges?
a)
GRANT
b)
GIVE ACCESS
c)
ALLOW
d)
GIVE
14.
Which statement do you use to remove other users privileges?
a)
REVOKE
b)
REMOVE ACCESS
c)
UNALLOW
d)
TAKE
15.
What does SQL stand for?
a)
 Structured Query Language
b)
 Structured Question Language
c)
 Strong Question Language
d)
 Strong Query Language
16.

Records are a collection of data items...

a)

...of the same data type

b)

...of different data types

17.

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"?

a)

SELECT * FROM Persons WHERE FirstName='a'

b)

SELECT * FROM Persons WHERE FirstName LIKE 'a%'

c)

SELECT * FROM Persons WHERE FirstName LIKE '%a'

d)

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