Google News
logo
SQL - Quiz(MCQ)
1 .
Which SQL statement is used to create a table in a database?
A)
CREATE DB
B)
CREATE TABLE
C)
CREATE DATABASE TABLE 
D)
CREATE DATABASE TAB

Correct Answer : Option (B) :   CREATE TABLE

2 .
Which of the following is not true about creating constraints?
A)
Constraints are defined using the CREATE CONSTRAINT statement.
B)
They are created at the same time when the table is created.
C)
They could be created after the table is created.
D)
All the constraints are stored in data dictionary.

Correct Answer : Option (A) :   Constraints are defined using the CREATE CONSTRAINT statement.

3 .
A systematic collection of data stored in a central location is known as?
A)
csv
B)
Database
C)
Flat file
D)
Excel

Correct Answer : Option (B) :   Database

4 .
Which of the following is true about a role?
A)
A role is a named group of related privileges.
B)
It can be it can be created and assigned to a user.
C)
It can be revoked from a user.
D)
All of the above.

Correct Answer : Option (D) :   All of the above.

5 .
Which type of database management system represents relations using tables?
A)
Network DBMS
B)
Hierachical DBMS
C)
Relational DBMS
D)
Object Oriented DBMS

Correct Answer : Option (C) :   Relational DBMS

6 .
What is a composite key?
A)
its is a key that is defined as the primary key in another table
B)
it is a key that uniquely identifies a record in a database
C)
its is an optional key and allows null values
D)
it is a primary key that consists of more than one field that uniquely identifies a record

Correct Answer : Option (D) :   it is a primary key that consists of more than one field that uniquely identifies a record

7 .
Which of the following is not YES regarding ER modeling.
A)
ER models act as non technical communication tools
B)
ER models increase the database developer's productivity
C)
ER models can be converted into a database
D)
ER models waste the database developer's time

Correct Answer : Option (D) :   ER models waste the database developer's time

8 .
What command is used to permanently remove a record from a database table?
A)
DROP
B)
REMOVE
C)
DELETE
D)
CUT

Correct Answer : Option (A) :   DROP

9 .
Which of the following is a valid aggregate function.
A)
CURDATE()
B)
COUNT
C)
AVERAGE
D)
MAXIMUM

Correct Answer : Option (B) :   COUNT

10 .
Wildcards are
A)
used to perform pattern matches
B)
not supported by MySQL
C)
use characters such as $ to perform pattern matches
D)
use characters such as % to perform single character matching

Correct Answer : Option (A) :   used to perform pattern matches