wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

MYSQL

Total questions: 25

Worksheet time: 9mins

Name
Class
Date
1.

Which SQL statement is used to delete an existing row ?

a)

DROP

b)

REMOVE

c)

DELETE

d)

UPDATE

2.

What does DML stand for?

a)

Data Migration Language

b)

Data Markup Language

c)

Data Modelling Language

d)

Data Manipulation Language

3.

Which statement will return different values?

a)

SELECT UNIQUE

b)

SELECT DISTINCT

c)

SELECT DIFFERENT

d)

SELECT ALL

4.

What is the default sort order in ORDER BY clause?

a)

Ascending

b)

Descending

5.

_________ statement is used to delete a table

a)

DELETE TABLE

b)

REMOVE TABLE

c)

DROP TABLE

d)

MODIFY TABLE

6.

Which of the following is not an aggregate function?

a)

DATE

b)

AVG

c)

COUNT

d)

MAX

7.

Which clause is used to filter out unwanted data?

a)

SELECT

b)

FROM

c)

WHERE

d)

ORDER BY

8.

In LIKE clause, you can search for 4 letter word by saying

a)

LIKE ' .... ' (4 dots)

b)

LIKE '????' (4 question marks)

c)

LIKE ' {6}'

d)

LIKE ' _ _ _ _' (4 underscores)

9.

Which SQL statement is used to modify data in a database table?

a)

MODIFY

b)

CHANGE

c)

ALTER

d)

UPDATE

10.

What will be the output for SELECT LENGTH("HELLO")

a)

5

b)

7

c)

HELLO

d)

ERROR

11.

The total number of rows in a table is called as

a)

integer

b)

degree

c)

cardinality

d)

tuples

12.

INSERT INTO EMP VALUES(1221, 'ABC', 'MANAGER',12323); What kind of statement is this ?

a)

DDL

b)

DML

c)

DCL

d)

TCL

13.

A relational database may have

a)

Primary Key

b)

Candidate Key

c)

Foreign Key

d)

All of these

14.

SELECT is a DDL / DML statement ?

a)

DDL

b)

DML

c)

Both

d)

None

15.

(a)   is used to select a database

(Type in upper case)

16.

A relational database can have how many types of keys in a table ?

a)

Candidate key

b)

Primary key

c)

Foreign key

d)

All of these

17.

Which one of the following uniquely identifies the tuples/tows in a relation ?

a)

Secondary key

b)

Primary key

c)

Composite key

d)

Foreign key

18.

What is the full form of DDL ?

a)

Dynamic data language

b)

Detailed data language

c)

Data definition language

d)

Data derivation language

19.

SELECT is a DDL/DML command ....

a)

DDL

b)

DML

c)

None of these

d)

Both

20.

Which of the following keywords will you use to display unique values of the column dept_name ?


SELECT ______ dept_name from COMPANY;

a)

All

b)

distinct

c)

from

d)

name

21.

Which of the following SQL commands retrieves data from table(s)?

a)

update

b)

select

c)

insert

d)

delete

22.

INSERT INTO EMP VALUES(101,'SUMAN','MANAGER');


Which kind of statement is this ?

a)

DDL

b)

DML

c)

Value

d)

Python statement

23.

What will be the output for :-


SELECT LENGTH("EMPLOYEE");

a)

10

b)

8

c)

EMPLOYEE

d)

1

24.

What will be the output for :-


SELECT ROUND(153.669,2);

a)

153.6

b)

153.7

c)

153.67

d)

153.66

25.

Total number of rows/records/horizontal arrangement in a table is called:

a)

Degree

b)

Records

c)

Integer

d)

Cardinality