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 logical objects?

A - Table space

B - Tables

C - Views

D - Both B & C

Answer : D

Explanation

Tables, Views, Synonyms and Alias are logical objects which are used by users and developers.

Q 2 - Which of the following can refer to both local as well as remote tables?

A - Synonyms

B - Alias

C - Both A & B

D - None of these

Answer : B

Explanation

Alias can refer to both local as well as remote tables whereas synonyms refers only to local tables.

Q 3 - What is the maximum size of a CHAR data type in DB2?

A - 256 bytes

B - 1032 bytes

C - 254 bytes

D - 1064 bytes

Answer : C

Explanation

Char data type maximum size is of 254 bytes.

Q 4 - Which statement is used to authorize access on database tables?

A - ACCESS

B - PRIVILEGE

C - AUTHORIZE

D - GRANT

Answer : D

Explanation

GRANT keyword is used to grant privileges on DB2 tables.

Answer : A

Explanation

You will face -811 SQLCODE when the SELECT query returns more than one number of rows.

Q 6 - Which utility reclaims space from pages when some rows were deleted?

A - RUNSTATS

B - REORG

C - RECOVER

D - COPY

Answer : B

Explanation

Reorg utility is used for reorganization of data on physical storage.

Q 7 - Which utility is take the backup of table spaces and index spaces?

A - RUNSTATS

B - REORG

C - RECOVER

D - COPY

Answer : D

Explanation

Copy utility is used to take the back up of table spaces and index spaces.

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 - Fetch statement identifies the cursor and puts the value in INTO clause. A Fetch statement is coded in loop as we get one row at a time. 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