Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL quizz

Total questions: 13

Worksheet time: 85secs

Name
Class
Date
1.

What is missing in this code?

SELECT * FROM WHERE genre = 'action' ORDER BY year ARC;

a)

Table name

b)

Capitalize action

c)

Missing an AND

d)

None of these

2.

Match the following SQL term with a description - ORDER BY

a)

The table used in the query

b)

The criteria that must be met

c)

The field and order used to sort the results

d)

The fields to display

3.

When examining a row in a table, we refer to it as a...

a)

result

b)

result number

c)

row number

d)

record

4.

How do we select all rows for the "Designer" table?

a)

SELECT Designer.*

b)

SELECT [All] FROM Designer

c)

SELECT FROM Designer

d)

SELECT * FROM Designer

5.

What does the SQL term 'JOIN' refer to?

a)

Combining rows from two or more tables based on a related column between them

b)

Sorting the results in ascending order

c)

Filtering rows based on a condition

d)

Grouping rows with the same value

6.

Which SQL statement is used to delete a table?

a)

REMOVE TABLE table_name;

b)

DROP TABLE table_name;

c)

DELETE TABLE table_name;

d)

ERASE TABLE table_name;

7.

What is the purpose of the SQL statement 'GROUP BY'?

a)

To filter rows based on a condition

b)

To sort the results in descending order

c)

To group rows that have the same values into summary rows

d)

To update existing records in a table

8.

If you were wanting to filter data, which clause would you use?

a)

Order by

b)

From

c)

Select

d)

Where

9.

What does the SQL term 'HAVING' refer to?

a)

Filtering rows based on a condition

b)

Sorting the results in descending order

c)

Grouping rows with the same value

d)

Filtering groups based on a condition

10.

Which SQL statement is used to update existing records in a table?

a)

MODIFY TABLE table_name;

b)

UPDATE TABLE table_name;

c)

CHANGE TABLE table_name;

d)

ALTER TABLE table_name;

11.

What is the purpose of the SQL statement 'DISTINCT'?

a)

To filter rows based on a condition

b)

To remove duplicate rows from the result set

c)

To group rows that have the same values into summary rows

d)

To update existing records in a table

12.

When examining a column in a table, we refer to it as a...

a)

folder name

b)

field name

c)

column name

d)

table name

13.

What does "SQL" stand for?

a)

Simple Question Language

b)

Structured Question Language

c)

Structured Query Language

d)

Simple Query Language