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 - How many databases can a DB2 system manage?

A - 1 database

B - 65279 databases

C - 10 databases

D - Unlimited

Answer : B

Explanation

This is self explanatory.

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 - 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 : D

Explanation

SQLCODE -818 is a timestamp mismatch of load module and bind timestamp built from DBRM.

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 - Locking is a process that is used to ensure data integrity and prevents concurrent users from accessing inconsistent data. State whether true or false?

A - False

B - True

Answer : B

Explanation

This is self explanatory.

Q 9 - Cursors are used to handle single row selections at a time. They are data structure which hold all the results of a query. State whether true or false?

A - False

B - True

Answer : A

Explanation

This statement is incorrect as cursors are used to handle multiple row selections at a time.

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