wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

5155495A332053514C

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.

What does Data Manipulation Language (DML) refer to in SQL?

a)

Commands used to create and delete database structures.

b)

Commands used to manage data stored inside database tables.

c)

Software used to install the MySQL server.

d)

Rules for naming variables in a PHP script.

2.

Which core DML command is used to add new records to a table?

a)

SELECT.

b)

UPDATE.

c)

INSERT.

d)

DELETE.

3.

What is a critical requirement when using the UPDATE or DELETE commands to ensure only specific records are affected?

a)

An ORDER BY clause.

b)

A WHERE clause.

c)

The LIMIT keyword.

d)

A semicolon at the beginning of the line.

4.

When inserting records, what must the values match regarding the specified columns?

a)

Only the data type, regardless of order.

b)

Only the order, regardless of data type.

c)

Both the order and the data type.

d)

Neither; MySQL automatically sorts the values.

5.

Which clause is used to organize query results in ascending (ASC) or descending (DESC) order?

a)

WHERE.

b)

GROUP BY.

c)

ORDER BY.

d)

SORT BY.

6.

If you want to retrieve exactly 5 records from a table, which clause should you use?

a)

LIMIT.

b)

FILTER.

c)

STOP.

d)

TOP.

7.

In pattern matching with the LIKE keyword, what does the % wildcard represent?

a)

Exactly one character.

b)

Any number of characters.

c)

Only numerical characters.

d)

The end of a semicolon.

8.

Which operator allows you to check if a value exists within a specific list of options, such as city IN ('Pasig', 'Taguig')?

a)

BETWEEN.

b)

OR.

c)

IN.

d)

LIKE.

9.

What is the purpose of using "Aliases" (the AS keyword) in a SELECT statement?

a)

To permanently rename the columns in the database.

b)

To rename columns in the output for clearer presentation and readability.

c)

To hide data from unauthorized users.

d)

To combine two tables into one.

10.

Which logical operator is used to ensure that a record is retrieved only if both specified conditions are true?

a)

OR.

b)

NOT.

c)

AND.

d)

BOTH.