Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL intro

Total questions: 26

Worksheet time: 26mins

Name
Class
Date
1.

What does "SQL" stand for?

a)

Structured Question Language

b)

Structured Query Language

c)

Simple Query Language

d)

Simple Question Language

2.

Which statement is used to extract data from a database?

a)

Extract

b)

Get

c)

Open

d)

Select

3.

Using which word allows you to specify that more than one condition must be met in a query?

a)

Also

b)

And

c)

Or

d)

Where

4.

Using which word allows you to specify that only one of a series of conditions needs to be met in a query filter?

a)

And

b)

Maybe

c)

If

d)

Or

5.

Which statement allows us to add a record to a table?

a)

Add To

b)

Update To

c)

Add Into

d)

Insert Into

6.

Less than 100?

a)

>= 100

b)

> 100

c)

=< 100

d)

< 100

7.

Which character returns all the data found in a table?

a)

%

b)

#

c)

*

d)

/

8.

Which word is missing from the following SQL statement?


Select * table_name

a)

With

b)

Where

c)

From

d)

And

9.

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

a)

SELECT * FROM Designer

b)

SELECT [All] FROM Designer

c)

SELECT Designer.*

d)

SELECT FROM Designer

10.

How would we script a SQL query to select "Description" from the Item table?

a)

SELECT Item.Description

b)

EXTRACT Description FROM Item

c)

SELECT Item FROM Description

d)

SELECT Description FROM Item

11.

Which query would return only the fields DesignerID and Designer?

a)

SELECT * FROM Designers

b)

SELECT DesignerID, Name FROM Designers

c)

SELECT DesignerID AND Designer FROM Designers

d)

SELECT DesignerID, Designer FROM Designers

12.

With SQL how can I return all items in the Item table sorted from the lowest priced to the highest priced?

a)

SELECT * FROM Items AND ORDER BY Price

b)

SELECT * FROM Items ORDER BY Price

c)

SELECT * FROM Items BY Price

d)

SELECT * FROM ORDER items BY Price

13.

Which SQL statement would add a record to the Designer table?

a)

INSERT INTO Designer VALUES (1, 'SMI01', 'M Smith', 'mail@msmith.com', 01224123456)

b)

INSERT VALUES ('SMI01', 'M Smith', 'mail@msmith.com', 01224123456') INTO Designer

c)

INSERT ('SMI01', 'M Smith', 'mail@msmith.com', '01224123456') INTO Designer

d)

INSERT Designer INTO VALUES (''SMI01', 'M Smith', 'mail@msmith.com', '01224123456')

14.

I want to see all of the Helados in the Products table that have a Price greater than 10?

a)

SELECT * FROM Products WHERE ProductName= 'Helado' AND Price > 10

b)

SELECT * FROM Products WHERE ProductName= 'Helado' OR Price < 25

c)

SELECT * FROM Products WHERE name= 'Helado' AND Price >= 10

d)

SELECT * FROM Products WHERE Price > 10

15.

What is each row in a database table also known as?

a)

A table

b)

A replica

c)

A record

d)

A field

16.

What is each column in a database table also known as?

a)

An entity

b)

A replica

c)

A record

d)

A field

17.

Greater than 100?

a)

>= 100

b)

>100

c)

=< 100

d)

< 100

18.

Greater than or equal to 100?

a)

>= 100

b)

> 100

c)

=< 100

d)

< 100

19.

The UPDATE SQL clause can _____________

a)

update only one row at a time

b)

update more than one row at a time

c)

delete more than one row at a time

d)

delete only one row at a time

20.

Which of the queries is most likely to have produced this result?

a)

ANSWER: SELECT id, name, year FROM movies WHERE year > 2010;

b)

ANSWER: SELECT id, name, year FROM movies WHERE year < 2010;

c)

ANSWER: SELECT * FROM movies WHERE year > 2010;

d)

ANSWER: SELECT id, name, year FROM movies WHERE YEAR > 2010;

21.

What is missing in this code? SELECT * FROM WHERE genre = ‘action’ ORDER BY year;

a)

Missing an AND

b)

Table name

c)

Capitalize action

d)

None of these

22.

SQL query to find all the cities whose humidity is 95.

a)

SELECT city WHERE humidity = 95

b)

SELECT city FROM weather WHERE humidity = 95

c)

SELECT humidity = 89 FROM weather

d)

SELECT city FROM weather

23.

In what order does SQL process the instructions?

a)

FROM - SELECT - WHERE - ORDER BY

b)

WHERE - FROM - SELECT - ORDER BY

c)

SELECT - FROM - WHERE - ORDER BY

d)

SELECT - FROM - ORDER By - WHERE

24.

When creatinga table, each column name has both a ...

a)

table name and a database

b)

command and an argument

c)

goal and a purpose

d)

name and a data type

25.

What data type is best for a date field? Example: 03/26/2021.

a)

TEXT

b)

VARCHAR

c)

INTEGER

26.

What is the correct format for the SUM statement?

a)

SELECT AVG(column_name)

FROM table_name

b)

SELECT SUM(table_name)

FROM column_name

c)

SELECT SUM(column_name)

FROM table_name

d)

SELECT (column_name)SUM

FROM table_name