Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Relational Database Management System

Total questions: 20

Worksheet time: 11mins

Name
Class
Date
1.

What SQL clause is used to restrict the rows returned by a query ?

a)

WHEN

b)

HAVING

c)

FROM

d)

WHERE

2.

To remove duplicate rows from the result set of a select use the following keyword(s).

a)

NO DUPLICATES

b)

DISTINCT

c)

UNIQUE

d)

None of the above

3.

MySQL runs on which operating systems ?

a)

Linux and Mac OS-X only

b)

Any operating system at all

c)

Unix , Linux , Windows and others

d)

Unix and Linux only

4.

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

a)

Add

b)

Insert

c)

Update

d)

Alter

5.

Which SQL statement is used to insert new data in database ?

a)

INSERT INTO

b)

UPDATE

c)

ADD

d)

INSERT NEW

6.

In a LIKE clause , you can could ask for any value ending in "qpt" by writing.

a)

LIKE"%qpt"

b)

LIKE"*ton"

c)

LIKE"ton$"

d)

LIKE^"ton$"

7.

A NULL value is treated as a blank or 0.

a)

True

b)

False

c)

None of the above

8.

MySQL is

a)

A Programming language

b)

A Markup language

c)

A technique for writing reliable programs

d)

A Relational Database Management System

9.

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

a)

LIKE ??????

b)

LIKE .{6}

c)

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

d)

LIKE ______ (that's six underscore characters)

10.

The result of a SELECT statement can contain duplicate rows .

a)

False

b)

True

c)

None of the above

11.

Which of the following is not a valid aggregate function ?

a)

COUNT

b)

MIN

c)

MAX

d)

COMPUTE

12.

What SQL clause is used to restrict the rows returned by a query depending on validity of two conditions simultaneously ?

a)

AND

b)

WHERE

c)

HAVING

d)

FROM

13.

Primary key does allow the Null Values, whereas in Unique key doesn't accept the Null values . True or False ?

a)

True

b)

False

14.

Which of the following commands should be used to create a database named "student" ?

a)

CREATE?I student

b)

CREATE DATABASE student

c)

DATABASE /student

d)

DATABASE student

15.

Which one will delete the table data as well as table structure?

a)

DELETE

b)

DROP

16.

The USE command ?

a)

Is used to load code from another file

b)

Has been deprecated and should be avoided for security reasons.

c)

Is a pseudo name for the SELECT command

d)

Should be used to choose the database you want to use once you've connected to MySQL.

17.

A SELECT command without a WHERE clause returns ?

a)

All records from a table that match the previous WHERE clause

b)

All the records from a table , or information about all the records.

c)

SELECT is invalid without a Where clause

d)

Nothing

18.

The table columns are also known as.....

a)

Attributes

b)

Fields

c)

Records

d)

Index

e)

Key

19.

The NULL keyword is used to :

a)

Represent unknown value

b)

represent a missing value

c)

represent a positive infinity

d)

represent 0 value

e)

represent empty string

20.

What is a foreign key ?

a)

A foreign key is a key field in table , which relates the table to another table where the key is a primary key or unique key.

b)

Constraint (reference integrity)

c)

The foreign key is a column that can have NULL value

d)

The foreign key is a column that can not have NULL values