- Home
- DB2 - Introduction
- DB2 - Server Installation
- DB2 - Instance
- DB2 - Databases
- DB2 - Bufferpools
- DB2 - Tablespaces
- DB2 - Storagegroups
- DB2 - Schemas
- DB2 - Data Types
- DB2 - Tables
- DB2 - Alias
- DB2 - Constraints
- DB2 - Indexes
- DB2 - Triggers
- DB2 - Sequences
- DB2 - Views
- DB2 with XML
- DB2 - Backup and Recovery
- DB2 - Database Security
- DB2 - Roles
- DB2 - LDAP
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.
Q 1 - Which of the following are physical objects?
Answer : D
Explanation
Database and Table space are physical objects.
Q 2 - Which columns are not good for indexing?
A - Frequently updated columns
Answer : D
Explanation
The purpose of index is to retrieve the data faster. So we choose those columns which are unique or less frequently updated.
Q 3 - Write the query to delete all the rows from a table TAB.
Answer : B
Explanation
DELETE * FROM table-name is the syntax to delete all the rows from a table.
Q 4 - Which statement is used to authorize access on database tables?
Answer : D
Explanation
GRANT keyword is used to grant privileges on DB2 tables.
Q 5 - When you will face SQLCODE -911?
Answer : B
Explanation
At the time of deadlock or timeout you will face SQLCODE -911.
Q 6 - If a transaction has an exclusive lock on some data, then what are the other types of lock which can be applied on it?
Answer : C
Explanation
A transaction gets an Exclusive lock when it is about to write at that time no other lock can be applied on it.
Q 7 - If a transaction takes a Update lock on some data, then other transactions can get what type of lock?
Answer : A
Explanation
If a transaction takes an Update lock on some data, then other transactions can only get only Shared lock on it.
Answer : B
Explanation
Yes we can add columns after table declaration by using ALTER statement.
Q 9 - Host Variables are used for receiving data from the table or inserting data to the table. Host variables must be declared for all values that are to be passed between program and DB2. State whether true or false?
Answer : B
Explanation
This is self explanatory.
Q 10 - What is the picture clause of Null Indicator variable?
Answer : C
Explanation
S9(4) COMP is the picture clause of a null indicator.
