Font size
WorksheetsSQL Practice Questions
Total questions: 107
Worksheet time: 1hrs 6mins
What does "SQL" stand for?
Structured Question Language
Structured Query Language
Simple Query Language
Simple Question Language
Which statement is used to extract data from a database?
Extract
Get
Open
Select
If you were wanting to filter data, which clause would you use?
Where
Order by
From
Select
Using which word allows you to specify that more than one condition must be met in a query?
Also
And
Or
Where
Using which word allows you to specify that only one of a series of conditions needs to be met in a query filter?
And
Maybe
If
Or
In order to amend data in a database we would use which SQL statement?
Update
Amend
Alter
Modify
Less than or equal to?
>=
=>
=<
<=
Which character returns all the data found in a table?
%
#
*
/
Which word is missing from the following SQL statement?
Select * table_name
With
Where
From
And
What is the correct order of clauses in a SQL statement?
SELECT, FROM, ORDER BY, WHERE
SELECT, FROM, WHERE, ORDER BY
SELECT, WHERE, FROM, ORDER BY
WHERE, FROM, SELECT, ORDER BY
How do we select all rows for the "Designer" table?
SELECT * FROM Designer
SELECT [All] FROM Designer
SELECT Designer.*
SELECT FROM Designer
How would we script a SQL query to select "Description" from the Item table?
SELECT Item.Description
EXTRACT Description FROM Item
SELECT Item FROM Description
SELECT Description FROM Item
Which query would return only the fields DesignerID and Designer?
SELECT * FROM Designers
SELECT DesignerID, Name FROM Designers
SELECT DesignerID AND Designer FROM Designers
SELECT DesignerID, Designer FROM Designers
Which SQL statement can eliminate duplicate rows?
SELECT UNIQUE
SELECT DIFFERENT
SELECT INDEX
SELECT DISTINCT
In what order does SQL process the instructions?
FROM - SELECT - WHERE - ORDER BY
WHERE - FROM - SELECT - ORDER BY
SELECT - FROM - WHERE - ORDER BY
SELECT - FROM - ORDER By - WHERE
Which symbol would you use to represent more than 50
= 50
< 50
> 50
# 50
Select * ............ 'table name ..........
'x OR y' returns a value from a database...
only if both x and y are true.
if either x or y, or both x and y are true.
if x is false.
only if both x and y are true.
What would the SQL query pictured do?
Find all the men
Find all of the female writers
Find all of Elgar's friends
Find all the male writers
Find all the fish
What would the query pictured do?
Find all of Elgar's friends who were born in 1869
Find all of Elgar's family who were born in the 1860s.
Find all the the ducks in Birmingham.
Find all of Elgar's colleagues born in 1860.
Find all of Elgar's colleagues who were born in the 1860s.
SELECT *
_______ CUSTOMER;
How would you find out the nature of Elgar's relationship with the member of his database who was a shop assistant?SELECT RelationshipToElgar FROM Elgar's Friends WHERE Occupation = 'Shop Assistant'
SELECT Connection FROM Elgar's Friends WHERE Occupation = 'Shop Assistant'
SELECT RelationshipToElgar FROM Table WHERE Occupation = 'Shop Assistant'
SELECT RelationshipToElgar FROM Elgar's Friends WHERE Job = 'Shop Assistant'
SELECT RelationshipToElgar IN Elgar's Friends WHERE Occupation = 'Shop Assistant'
CHOOSE RelationshipToElgar FROM Elgar's Friends WHERE Occupation = 'Shop Assistant'
SQL table names are case sensitive
How many fields are there?
4
5
6
7
Which field is the key field?
ID
Name
HighScore
Competition
What is the ID of the records that are returned when the SQL statement "SELECT * FROM Gymnasts WHERE Name='Xavier'"?
0001
0002
0003
0004
0005
What is the ID of the records that are returned when the SQL statement "SELECT * FROM Gymnasts WHERE HighScore > 8.4"?
0001
0002
0003
0004
0005
Which of the following statements will return the most records?
SELECT * FROM Gymnasts WHERE HighScore > 8.0
SELECT * FROM Gymnasts WHERE Competition LIKE R%
SELECT * FROM Gymnasts WHERE Competition LIKE %o%
SELECT * FROM Gymnasts WHERE Name LIKE %i%
How many records are there in this table?
6
7
9
42
How many records would be returned by the following SQL "SELECT * FROM songs WHERE TimesPlayed >=3
0
2
3
4
How many records would be returned by the following SQL "SELECT * FROM songs WHERE Length < 3 AND Protected = True"?
0
2
3
4
In a database, records of data are kept in tables.
True
False
In a table, a record is
a group of data about one thing, one person or one event.
a compilation of songs to play
a plastic sheet with data on it
SELECT * FROM students;
This will show
1 record from the "students" table
all the records in the "students" table
first 10 records of "students" table
all the boys in the table "students"
How would you display Chairs in the Items table that have a Price greater than £50.
SELECT * FROM Items WHERE Type = 'Chair' AND Price > 50
SELECT * FROM Items WHERE Type = 'Chair' OR Price < 100
SELECT * FROM Iterms WHERE Type = 'Chair' AND Price >= 50
SELECT * FROM Items WHERE Price > 50
Match the following SQL term with a description - FROM
The criteria which must be met
The fields to display
The field and order used to sort the results
The table used in the query
Match the following SQL term with a description - SELECT
The fields to display
The table used in the query
The criteria which must be met
The field and order used to sort the results
Match the following SQL term with a description - WHERE
The table used in the query
The fields to display
The field and order used to sort the results
The criteria which must be set
Match the following SQL term with a description - ORDER BY
The fields to display
The field and order used to sort the results
The table used in the query
The criteria that must be met
When examining a row in a table, we refer to it as a...
row number
result number
record
result
When examining a column in a table, we refer to it as a...
field name
folder name
column number
table name
When defining a table, each field name has both a ...
table name and a database
command and an argument
goal and a purpose
name and a data type
Which of the queries is most likely to have produced this result?
ANSWER: SELECT id, name, year FROM movies WHERE year > 2010;
ANSWER: SELECT id, name, year FROM movies WHERE year < 2010;
ANSWER: SELECT * FROM movies WHERE year > 2010;
ANSWER: SELECT id, name, year FROM movies WHERE YEAR > 2010;
