- 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 physical objects?
Answer : D
Explanation
Database and Table space are physical objects.
Q 2 - Which columns are good for indexing?
Answer : D
Explanation
The purpose of index is to retrieve the data faster. So we choose those columns which are unique.
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 - When you will face SQLCODE 100?
A - No Rows found satisfying the SQL statement or End of Cursor
Answer : A
Explanation
When no rows are found or you reach the end of cursor, then you will get SQLCODE = 100
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 - Suppose we added a new column by using ALTER statement, where the column will be added?
Answer : B
Explanation
When we use ALTER statement for adding a new column then it will be added at the end of the table.
Answer : B
Explanation
FREE command is used to drop an existing plan.
Answer : B
Explanation
Yes we can add columns after table declaration by using ALTER statement.
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?
Answer : A
Explanation
This statement is incorrect as cursors are used to handle multiple row selections at a time.
Q 10 - Which component is used to processes SQL statements and selects the access paths?
Answer : C
Explanation
DB2 optimizer is used to select the access paths & to process the SQL queries.
To Continue Learning Please Login
Login with Google