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 - Which of the following are physical objects?

A - Table space

B - Database

C - Views

D - Both A & B

Answer : D

Explanation

Database and Table space are physical objects.

Answer : C

Explanation

A partitioned table space can house one table and allows a table to be divided by rows into partitions that the system can manage separately.

Q 3 - Write a query to delete a table TAB from database.

A - DELETE TABLE TAB

B - DELETE TAB

C - DROP TAB

D - DROP TABLE TAB;

Answer : D

Explanation

DROP TABLE table-name is the syntax to delete a table from database.

Answer : C

Explanation

Bind step converts all the SQL statements into executable form in COBOL-DB2 program.

Q 5 - Which operation is not associated with cursor?

A - Declare

B - Open

C - Read

D - Close

Answer : C

Explanation

We do not use read statement with cursor instead we use fetch statement.

Q 6 - In which isolation level phantom rows can occur?

A - Repeatable Read

B - Read Stability

C - Both A & B

D - None of these

Answer : B

Explanation

In this isolation level other programs can INSERT new data so we can get phantom rows.

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 - One tablespace is associated with one bufferpool. The size of bufferpool and tablespace must be same. State whether true or false?

A - False

B - True

Answer : B

Explanation

This is self explanatory.

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
E-Books Store