- DB2 Tutorial
- 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 Useful Resources
- DB2 - Questions and Answers
- DB2 - Quick Guide
- DB2 - Useful Resources
- DB2 - Discussion
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 logical objects?
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?
Answer : B
Explanation
Alias can refer to both local as well as remote tables whereas synonyms refers only to local tables.
Q 3 - Write a query to delete a table TAB from database.
Answer : D
Explanation
DROP TABLE table-name is the syntax to delete a table from database.
Q 4 - What happens in BIND step in a DB2 program?
A - Bind step checks for data type matches
B - Bind contains SQL statements
Answer : C
Explanation
Bind step converts all the SQL statements into executable form in COBOL-DB2 program.
Q 5 - When you will face SQLCODE -803?
A - No Rows found satisfying the SQL statement or End of Cursor
Answer : D
Explanation
When you will try to insert or update a record with duplicate key then you will face SQLCODE = -803
Q 6 - Which utility reclaims space from pages when some rows were deleted?
Answer : B
Explanation
Reorg utility is used for reorganization of data on physical storage.
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 - In a COBOL-DB2 program all SQL statements must be coded in Area A. State whether true or false?
Answer : A
Explanation
This statement is incorrect as SQL statements must be coded in Area B.
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.
To Continue Learning Please Login
Login with Google