wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DAY 17 - MySQL Commands: DDL, DML, TCL (2nd July 2024)

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Which of the following is a DDL command in SQL?

a)

SELECT

b)

INSERT

c)

CREATE

d)

UPDATE

2.

What does DML stand for in SQL?

a)

Data Modification Language

b)

Data Manipulation Language

c)

Data Management Language

d)

Data Mining Language

3.

Which of the following commands is used to delete a table in

SQL?

a)

DELETE

b)

DROP

c)

REMOVE

d)

ERASE

4.

Which command is used to insert new data into a table?

a)

ADD

b)

INSERT

c)

UPDATE

d)

APPEND

5.

Which command is used to change the structure of a table?

a)

ALTER

b)

MODIFY

c)

CHANGE

d)

UPDATE

6.

Which of the following commands is used to save all changes

made during the current transaction?

a)

SAVE

b)

APPLY

c)

COMMIT

d)

EXECUTE

7.

Which command removes all rows from a table without

logging the individual row deletions?

a)

DELETE

b)

ERASE

c)

CLEAR

d)

TRUNCATE

8.

Which command is used to undo transactions that have not

yet been saved to the database?

a)

UNDO

b)

REVERT

c)

ROLLBACK

d)

CANCEL

9.

Which DML command is used to modify existing records in a

table?

a)

CHANGE

b)

UPDATE

c)

MODIFY

d)

ALTER

10.

Which of the following commands is a TCL command?

a)

SELECT

b)

COMMIT

c)

DELETE

d)

CREATE

11.

Which command is used to remove rows from a table

based on a condition?

a)

DELETE

b)

REMOVE

c)

DROP

d)

TRUNCATE

12.

What does the SQL command GRANT do?

a)

Removes user privileges

b)

Creates a new user

c)

Modifies table structure

d)

Gives user access privileges to the database

13.

Which command is used to permanently remove a table

from a database?

a)

DELETE

b)

ERASE

c)

DROP

d)

TRUNCATE

14.

Which DML command is used to retrieve data from a

database?

a)

SELECT

b)

FETCH

c)

GET

d)

RETRIEVE

15.

Which of the following commands can be used to

rename a table?

a)

RENAME TABLE

b)

MODIFY TABLE

c)

CHANGE TABLE

d)

ALTER TABLE