DB2 Online Quiz


Advertisements

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.

Q 2 - How many numbers of tables can be created inside a table space?

A - 255

B - Only 1

C - No Limit

D - None of these

Answer : C

Explanation

A table space can house any number of tables.

Q 3 - How many primary keys can be declared on a table?

A - No Limit

B - Only 1

C - 5

D - 10

Answer : B

Explanation

A table can have only one primary key.

Answer : B

Explanation

DCLGEN stands for Declaration Generator.

Q 5 - In a COBOL-DB2 program where can we declare a cursor?

A - Working Storage Section

B - Procedure Division

C - Linkage Section

D - Both A & B

Answer : D

Explanation

We can declare a cursor either i Working Storage Section or in Procedure Division also.

Q 6 - Which isolation level provides maximum concurrency?

A - Repeatable Read

B - Read Stability

C - Cursor Stability

D - Uncommitted Read

Answer : D

Explanation

Uncommitted read provides maximum concurrency.

Q 7 - When a table is dropped all the synonyms get dropped automatically. State whether true or false?

A - False

B - True

Answer : B

Explanation

Synonyms get dropped automatically when we drop the table but alias of the table remains there.

Q 8 - Deadlock resolution is done by rolling back one of the transactions which has the least log entries. State whether true or false?

A - False

B - True

Answer : B

Explanation

This statement is correct.

Q 9 - Embedded SQL statements are used in COBOL programs to perform standard SQL operations. Embedded SQL statements are preprocessed by SQL processor before application program is compiled. State whether true or false?

A - False

B - True

Answer : B

Explanation

This is self explanatory.

Q 10 - What SQLCODE you will get for a successful execution of query?

A - 100

B - 0

C - -100

D - Blank

Answer : B

Explanation

You will get SQLCODE = 0 if the execution is successful.

db2_questions_answers.htm
Advertisements