DB2 Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to DB2. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 1 - Can a DB2 system have more than one databases?

A - No

B - Yes

Answer : B

Explanation

Yes, a DB2 system can have more than one database.

Answer : D

Explanation

The purpose of index is to retrieve the data faster. So we choose those columns which are unique or less frequently updated.

Q 3 - In which statement you can define primary key?

A - CREATE TABLE

B - ALTER TABLE

C - UPDATE TABLE

D - Both A & B

Answer : D

Explanation

Primary keys are optional and we can define them in CRETAE TABLE & ALTER TABLE statements.

Answer : B

Explanation

DBRM stands for Database Request Module which contains SQL statements.

Q 5 - Which command is used to start an instance on DB2?

A - STARTDB2

B - DB2START

C - DB2STOP

D - RUNDB2

Answer : B

Explanation

DB2START command is used to start an instance on DB2.

Q 6 - Suppose we added a new column by using ALTER statement, where the column will be added?

A - Starting of the table

B - End of the table

C - Middle of the table

D - None of these

Answer : B

Explanation

When we use ALTER statement for adding a new column then it will be added at the end of the table.

Q 7 - Which utility is used to load data into a table from a sequential file?

A - RUNSTATS

B - REORG

C - RECOVER

D - LOAD

Answer : D

Explanation

Load utility is used to load data into tables.

Q 8 - Can we add columns to add table after defining it?

A - No

B - Yes

Answer : B

Explanation

Yes we can add columns after table declaration by using ALTER statement.

Q 9 - Host variables cannot be group items but they may be grouped together in host structure. They can be Renamed or Redefined. State whether true or false?

A - False

B - True

Answer : A

Explanation

This statement is incorrect as host variables cannot be renamed & redefined.

Q 10 - Which field in SQLCA shows the number of updated rows after update statement?

A - SQLCODE

B - SQLERRM

C - SQLERRD

D - None of these

Answer : C

Explanation

Check the value of SQLERRD to know how many rows got updated after an update statement.

db2_questions_answers.htm
Advertisements