wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

MySQL

Total questions: 20

Worksheet time: 7mins

Name
Class
Date
1.

What does SQL stand for?

a)

Structured Query Language

b)

Structured Question Language

c)

Strong Question Language

d)

None of the above

2.

Which of the following can add a row to a table?

a)

Add

b)

Insert

c)

Update

d)

Alter

3.

What does DML stand for?

a)

Data Manipulation Language

b)

Data Modeling Language

c)

Data Markup Language

d)

Data Migration Language

4.

Which of the following is not a keyword of MYSQL?

a)

Select

b)

Top

c)

Group

d)

Insert

5.

Which of the following query is correct to get Current Date from Query?

A. SELECT DATE ( NOW() ) as today;

B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;

a)

A. SELECT DATE ( NOW() ) as today;

b)

B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;

c)

Both A and B

d)

None

6.

Which of the following is not a valid aggregate function?

a)

COUNT

b)

MIN

c)

COMPUTE

d)

MAX

7.

SQL is not case sensitive. SELECT is the same as select.

a)

TRUE

b)

FALSE

8.

The _________ statement is used to delete a table.

a)

DROP TABLE

b)

DELETE TABLE

c)

DEL TABLE

d)

REMOVE TABLE

9.

Which one of the following sorts rows in SQL?

a)

SORT BY

b)

ALIGN BY

c)

GROUP BY

d)

ORDER BY

10.

The SQL statement that queries or reads data from a table is __________ .

a)

USE

b)

SELECT

c)

READ

d)

QUERY

11.

Which SQL statement is used to return only different values?

a)

SELECT DISTINCT

b)

SELECT UNIQUE

c)

SELECT DIFF

d)

SELECT DIFFERENT

12.

With SQL, how do you select all the columns from a table named "Persons"?

a)

SELECT * FROM Persons

b)

SELECT Persons

c)

SELECT [all] FROM Persons

d)

SELECT *.Persons

13.

In a LIKE clause, you can ask for any 6 letter value by writing

a)

LIKE ______ (that's six underscore characters)

b)

LIKE ...... (that's six dots)

c)

LIKE .{6}

d)

LIKE ??????

14.

Which SQL statement is used to update data in a database?

a)

MODIFY

b)

ALTER

c)

SAVE

d)

UPDATE

15.

SQL can be used to:

a)

Create database structures only.

b)

Query database data only.

c)

Modify database data only.

d)

All of the above can be done by SQL.

16.

The SQL keyword BETWEEN is used:

a)

For ranges.

b)

To limit the columns displayed.

c)

As a wildcard.

d)

None of the above

17.

Which statement is used to delete an existing row from the table?

a)

DELETE

b)

WHERE

c)

MODIFY

d)

None of these

18.

Which clause is used to “Filters out unwanted data”?

a)

FROM

b)

SELECT

c)

ORDER BY

d)

WHERE

19.

Which is the default order of sort in ORDER BY clause?

a)

Ascending

b)

Descending

20.

Write a query to display first_name and last_name of all employees who have their first_name starting with 'A'.

a)

Select first_name from employess where first_name LIKE '%A';

b)

Select first_name from employess where first_name LIKE "'A'%";

c)

Select first_name from employess where first_name LIKE 'A%';

d)

Select first_name from employess where first_name LIKE '%A%';