wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL Commands - SELECT Statements

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.

Complete the SELECT Statement

SELECT * (a)   ABC

2.

What does ABC in the Select Statement Represent?

SELECT * FROM ABC

a)

The Name of the Table

b)

The Name of the Database

c)

The Name of the Column

3.

What does the * in the Select Statement represent?

SELECT * FROM ABC

a)

The First Column in the Table

b)

All the Columns

in the Table

c)

The Last Column in the Table

4.

What goes into the WHERE Clause of a Select Statement?

SELECT * FROM ABC

WHERE _____

a)

The database that the table is in

b)

The columns that need to be retrieved

c)

The condition that the Results must fulfil

5.

Modify the Select Statement to only get the following Columns

Col1, Col2

SELECT * FROM ABC

a)

SELECT

Col1 and Col2

FROM ABC

b)

SELECT

Col1 Col2

FROM ABC

c)

SELECT

Col1, Col2, *

FROM ABC

d)

SELECT

Col1, Col2

FROM ABC

6.

Which is the line that helps us check if the phone number '91234567' is already added?

SELECT Name, Email

FROM Contacts

WHERE Phone = '91234567'

a)

SELECT Name, Email

b)

FROM Contacts

c)

WHERE Phone = '91234567'

7.

Which is the line that tells SQL which table to use?

SELECT Name, Email

FROM Contacts

WHERE Phone = '91234567'

a)

SELECT Name, Email

b)

FROM Contacts

c)

WHERE Phone = '91234567'

8.

Which line do we modify to change the columns we retrieve?

SELECT Name, Email

FROM Contacts

WHERE Phone = '91234567'

a)

SELECT Name, Email

b)

FROM Contacts

c)

WHERE Phone = '91234567'

9.

What happens if we leave out the WHERE part of a SELECT Statement?

SELECT Name, Email

FROM Contacts

WHERE Phone = '91234567' <-

a)

All the results will display

b)

All the results will be wrong

c)

An Error will occur

10.

What happens if we rearrange the Columns in a Select Statement?

SELECT Email, Name <-

FROM Contacts

WHERE Phone = '91234567'

a)

The columns will not be retrieved

b)

The columns will be displayed in that order

c)

An Error will occur