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.

Q 2 - Suppose a table A has an Alias named AL1. Which of the query is correct to drop the AL1 alias?

A - DROP ALIAS AL1 ON TABLE A

B - DROP ALIAS AL1

C - DROP AL1

D - DROP TABLE AL1

Answer : B

Explanation

DROP ALIAS alias-name is the correct syntax.

Answer : A

Explanation

SPUFI stands for SQL Processor Using File Input.

Q 4 - Suppose a Plan contains 4 Packages & we modified one of the DBRM which is present in one of the Package. Then for normal functionality of application what should we do?

A - Bind complete plan

B - Bind all packages

C - Bind one package in which modified DBRM is present

D - None of these

Answer : C

Explanation

We will bind only that package which contains the modified DBRM. No need to bind all the packages.

Answer : B

Explanation

When object is not defined and you are using it then you will see SQLCODE = -204

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 - If a transaction takes a Update lock on some data, then other transactions can get what type of lock?

A - Shared

B - Update

C - Exclusive

D - Both A & B

Answer : A

Explanation

If a transaction takes an Update lock on some data, then other transactions can only get only Shared lock on it.

Q 8 - Exclusive locks are taken for INSERT, UPDATE and DELETE purposes. State whether true or false?

A - False

B - True

Answer : B

Explanation

This is self explanatory.

Q 9 - Embedded SQL statements works like normal SQL statements with some minor changes like output of query is directed to pre-defined set of variables which are referred as Host Variables. State whether true or false?

A - False

B - True

Answer : B

Explanation

This statement is correct.

Q 10 - What is the physical storage length of TIMESTAMP data type?

A - 4 bytes

B - 3 bytes

C - 10 bytes

D - 20 bytes

Answer : C

Explanation

TIMESTAMP data type takes 10 bytes and default is YYYY-MM-DD:HH:MM:SS-NNNNNN

db2_questions_answers.htm
Advertisements