wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL Basic

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.

Which clause is used with the ALTER TABLE statement?

a)

JOIN

b)

SELECT

c)

INTO

d)

ADD COLUMN

2.

What is a relational database?

a)

A database that organizes information into one or more tables.

b)

A set of data values of a particular type.

c)

A single record in a table

d)

A collection of data organized into rows and columns.

3.

What would you need to complete the associated UPDATE statement?

UPDATE ________

SET height = 6

WHERE id = 1;

a)

A column name.

b)

A table name.

c)

The keyword INTO.

d)

A row name.

4.

What are common data types in SQL?

a)

PDF, JPEG, GIF, MP3

b)

id, name, age

c)

Row, Column

d)

Integer, Text, Date, Real

5.

What does the INSERT statement do?

a)

Fetch data from a database.

b)

Insert a new table into a database

c)

Insert new rows into a table

d)

Insert new columns into a table

6.

What is a NULL value?

a)

A value that represents missing or unknown data.

b)

A numerical value.

c)

An outdated value.

d)

A known value.

7.

What is the purpose of the * character?


SELECT * 
FROM celebs;

a)

It selects new values in the table.

b)

It only selects columns where values are not empty in the table.

c)

It selects the leftmost column in the table.

d)

It selects every column in the table.

8.

What does SQL stand for?

(a)  

9.

Which of the following statements is correct and complete?


a)

DELETE FROM icecream WHERE flavor IS NULL;

b)

DELETE icecream WHERE flavor NULL;

c)

WHERE flavor IS NULL DELETE FROM icecream

d)

WHERE flavor IS NULL

10.

What would be correct syntax for a CREATE TABLE statement?


a)

NEW TABLE meals ( name TEXT, rating INTEGER) ;

b)

CREATE TABLE meals ( name TEXT, rating INTEGER) ;

c)

CREATE meals name TEXT INTEGER

d)

CREATE meals ( name TEXT, rating INTEGER);