wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

SQL and databases

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What do the letters in CRUD stand for?

a)

Create Read Update Delete

b)

Craft Run Upload Database

c)

Create Run Unrun Data

d)

Crunch Read Uptime Downtime

2.

Which statement is used to extract data from a database?

a)

EXTRACT

b)

GET

c)

OPEN

d)

SELECT

3.

To remove a record from a table, which SQL statement would you use?

a)

REMOVE

b)

DELETE

c)

CANCEL

d)

ERADICATE

4.

What's one solid reason for us to use databases instead of just storing stuff in a variable on the server?

a)

If the server goes down, we won't lose all our data--our data will persist between sessions

b)

A database is a more compact way of storing the information

c)

Accessing information from a database is faster than accessing information from a variable

d)

It's a toss-up, really--they're both good ways of storing information

5.

Using which word allows you to specify that MORE THAN ONE condition must be met in a query?

a)

OR

b)

WHERE

c)

AND

d)

SELECT

6.

I want to create a table in my table named "actors" with two columns: "name" and "age." What statement will do this?

a)

CREATE TABLE actors (name TEXT, age INTEGER);

b)

CREATE actors WITH COLUMNS (name, age);

c)

CREATE DATABASE actors WITH COLUMNS (name TEXT, age INTEGER);

d)

CREATE actors (name, age): TABLE, TEXT, INTEGER;

7.

I want to add the actor "Brad Pitt" (aged 56) to my table "actors." Which statement will do this?

a)

INSERT INTO actors VALUES ("Brad Pitt", 56);

b)

INSERT "Brad Pitt" AND 56 INTO actors;

c)

UPDATE age = 56 WHERE name = "Brad Pitt";

d)

CREATE ENTRY ("Brad Pitt", 56) IN TABLE actors;

8.

I want to select EVERY column and entry in my "actors" table. How can I do that?

a)

SELECT * FROM actors;

b)

SELECT age FROM actors;

c)

SELECT * FROM actors WHERE age > 30;

d)

SELECT name, age FROM actors WHERE age < 30;

9.

I want to select all columns in my "actors" table for all actors older than 30. How can I do that?

a)

SELECT * FROM actors;

b)

SELECT age FROM actors;

c)

SELECT * FROM actors WHERE age > 30;

d)

SELECT name, age FROM actors WHERE age < 30;

10.

Which aggregate function would I want to use to see which actor in my table is the oldest?

a)

SUM

b)

MAX

c)

GROUP BY

d)

WHERE