wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL Quiz 2

Total questions: 10

Worksheet time: 20mins

Name
Class
Date
1.

What does the Q in SQL stand for?

a)

Query

b)

Question

c)

Quizzical

d)

Quantify

2.

The join operation which includes everything from each table is

a)

FULL OUTER

b)

COMPLETE TOTAL

c)

ABSOLUTE 100%

d)

FULL INNER

3.

What is the difference between WHERE and HAVING?

a)

HAVING only applies to aggregate functions like GROUP BY

b)

There are interchangeable

c)

WHERE specifies a GEOGRAPHIC location for a database server

d)

WHERE has limited use

4.

Why make views?

a)

It is faster, safer and better practice to not allow general access to the production database

b)

You should not, they are slow

c)

You should not, they are inefficient

d)

"View" is simply a synonym for the return of the SELECT function

5.

Which operator selects values WITHIN a range?

a)

BETWEEN

b)

INSIDE

c)

< AND >

d)

> AND <

6.

CREATE allows us to make

a)

Tables

b)

Databases

c)

Views

d)

Indexes

7.

How do we comment in SQL?

a)

--....

b)

#.....

c)

/**....**/

d)

//.....

8.

What does the MINUS operator do?

a)

Subtracts one number from another

b)

Returns rows only from the first query

c)

Returns rows only from the second query

d)

Deletes a row

9.

Which keywords are needed for defining a new procedure?

a)

CREATE, BEGIN, END

b)

CREATE, MAKE, FINISH

c)

BEGIN, END

d)

NEW_PROCEDURE

10.

What is a foreign key?

a)

A primary key of a different table present in another table

b)

A key from a different SQL system (e.g. Postgres to SQL Server)

c)

A key to the international version of SQL server

d)

A primary key from any other database