wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DBMS Quizz

Total questions: 24

Worksheet time: 12mins

Name
Class
Date
1.

Which command is used to remove a relation from an SQL?

a)

Drop table

b)

Delete

c)

Purge

d)

Remove

2.

Which of the following is not a DDL command?

a)

TRUNCATE

b)

ALTER

c)

CREATE

d)

UPDATE

3.

Which of the following are TCL commands?

a)

COMMIT and ROLLBACK

b)

UPDATE and TRUNCATE

c)

SELECT and INSERT

d)

GRANT and REVOKE

4.

Which statement is used to delete all rows in a table without having the action logged?

a)

DELETE

b)

REMOVE

c)

DROP

d)

TRUNCATE

5.

SQL Views are also known as

a)

Simple tables

b)

Virtual tables

c)

Complex tables

d)

Actual Tables

6.

How many Primary keys can have in a table?

a)

Only 1

b)

Only 2

c)

Depends on no of Columns

d)

Depends on DBA

7.

In which of the following cases a DML statement is not executed?

a)

When existing rows are modified.

b)

When a table is deleted.

c)

When some rows are deleted.

d)

All of the above

8.

Which data manipulation command is used to combines the records from one or more tables?

a)

SELECT

b)

PROJECT

c)

JOIN

d)

PRODUCT

9.

A command that lets you change one or more field in a table is:

a)

INSERT

b)

MODIFY

c)

LOOK-UP

d)

All of the above

10.

The SQL statement:

SELECT ROUND (65.726, -1) FROM DUAL;  

a)

is illegal

b)

garbage

c)

726

d)

70

11.

_________ command makes the updates performed by the transaction permanent in the database?

a)

ROLLBACK

b)

COMMIT

c)

TRUNCATE

d)

DELETE

12.

Which command is used to change the definition of a table in SQL?

a)

CREATE

b)

UPDATE

c)

ALTER

d)

SELECT

13.

Which statement is used to get all data from the student table whose name starts with p?

a)

SELECT * FROM student WHERE name LIKE '%p%';

b)

SELECT * FROM student WHERE name LIKE 'p%';

c)

SELECT * FROM student WHERE name LIKE '_p%';

d)

SELECT * FROM student WHERE name LIKE '%p';

14.

Which clause is used to retrieve a unique element from the table?

a)

SELECT UNIQUE

b)

SELECT DISTINCT

c)

Both A) and B)

d)

None of the above

15.

Which function combines the two different columns?

a)

ADD

b)

MERGE

c)

CONCAT

d)

None of the above

16.

SQL INSERT command is used to insert a –

a)

Single or Multiple record

b)

Single or Multiple database

c)

Single or Multiple table

d)

None of the above

17.

In order to insert a row directly in the table, which command is used?

a)

INSERT IN

b)

INSERT INSIDE

c)

INSERT UNDER

d)

INSERT INTO

18.

In order to delete duplicate rows from the table, which keyword is used?

a)

DELETE

b)

DISTINCT

c)

FROM

d)

WHERE

19.

Commands that comes under DDL is/are –

a)

CREATE

b)

DROP

c)

TRUNCATE

d)

All of the above

20.

Command that comes under DML is/are –

a)

ROLLBACK

b)

GRANT

c)

UPDATE

d)

All of the above

21.

Command that comes under DCL is/are -

a)

GRANT

b)

REVOKE

c)

Both A. and B.

d)

None of the above

22.

Commands that come under TCL is/are -

a)

COMMIT

b)

ROLLBACK

c)

SAVEPOINT

d)

All of the above

23.

What does the following statement in SQL do?

DROP TABLE student;

a)

Deletes a table called student.

b)

Creates a table called student.

c)

Check if there is a table called student.

d)

None of the above.

24.

 

What does the following code snippet do?

DELETE FROM STUDENTS WHERE AGE = 16; ROLLBACK;

a)

Performs an undo operation on the delete operation.

b)

Deletes the rows from the table where AGE = 16

c)

Deletes the entire table

d)

None of the above