- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.

Get it now !!
Send your Resume to 6000 Companies
DB2 Interview Questions & Answers - Learning Mode

DB2 Interview Questions & Answers - Learning Mode

DB2 is a family of relational database management system (RDBMS) products from IBM that serve a number of different operating system platforms. According to IBM, DB2 leads in terms of database market share and performance. DB2 is short for Database 2.

Try DB2 Interview Questions & Answers - Exam Mode

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Next

Sort By : Latest First | Oldest First | By Rating

DB2 Interview Questions & Answers - Learning Mode
Try DB2 Interview Questions & Answers - Exam Mode
Question: What is DCLGEN ?

Answer: DeCLarations GENerator: used to create the host language copy books for the table definitions. Also creates the DECLARE table. Source:
Question: What is the diff bet plan,package,dbrm?

Answer: Plan is generated when you compile the DB2-SQL program.

This plan is stored in the DBRM and binded to database as packages. (stored in syscat.syspackages - pkgname)
Question: How to see the status of the table?

Answer: Use DB2I command. Option 7.

Question: 5) How do you retrieve the first 5 characters of FIRSTNAME column of DB2 table EMP ?


Question: 47) EXPLAIN has output with MATCHCOLS = 0. What does it mean? ?

Answer: a nonmatching index scan if ACCESSTYPE = I. Source:
Question: What is a clustering index ?

Answer: Causes the data rows to be stored in the order specified in the index. A mandatory index defined on a partitioned table space. Source:
Question: What is the physical storage length of each of the following DB2 data types:

Answer: DATE: 4bytes
TIME: 3bytes
TIMESTAMP: 10bytes Source:
Question: How would you find out the total number of rows in a table? ?

Answer: Use SELECT COUNT(*) ... Source:
Question: 15) What is 'LIKE' used for in WHERE clause? What are the wildcard characters? ?

Answer: LIKE is used for partial string matches. ?%? ( for a string of any character ) and ?_? (for any single character ) are the two wild card characters. Source:
Question: What are the 2 sqlcodes that are returned? ?

Answer: 100 ( for successful completion of the query ), 0 (for successful COMMIT if AUTOCOMMIT is set to Yes). Source:
Question: 91) What is the difference between primary key & unique index ?

Answer: Primary : a relational database constraint. Primary key consists of one or more columns that uniquely identify a row in the table. For a normalized relation, there is one designated primary key.

Unique index: a physical object that stores only unique values. There can be one or more unique indexes on a table. Source:
Question: What is a collection?

Answer: a user defined name that is the anchor for packages. It has not physical existence. Main usage is to group packages.
In SPUFI suppose you want to select max. of 1000 rows , but the select returns only 200 rows. Source:
Question: 4) How do you find the maximum value in a column in db2?

Answer: Use SELECT MAX(...) .. in db2 query

Question: 50) What are the isolation levels possible ? ?

Answer: CS: Cursor Stability

RR: Repeatable Read Source:
Question: What is the cascade rule and how does it relate to deletions made with a subselect. The cascade rule will not allow deletions based on a subselect that references the same table from which the deletions are being made.

Answer: Cascade rule is one of the RI constraint. Which allows deletion of FK from the Dependent table if the PK from the parent is deleted. If we try to delete record from the parent that is not in the child we will see abend code -532.

Question: Suppose I have a program which uses a dynamic SQL and it has been performing well till now. Off late, I find that the performance has deteriorated. What happened?

Answer: Probably RUN STATS is not done and the program is using a wrong index due to incorrect stats.
Probably RUNSTATS is done and optimizer has chosen a wrong access path based on the latest statistics. Source:
Question: How many columns maximum can be created in a table of a inner table of the subquerry

Answer: Maximum number of columns in a table --> 256
Maximum lenght of a row in a table -- > 64KB Source:
Question: What is the difference between SYNONYM and ALIAS?

Answer: Sequence detector : A sequence detector gives an output of 1 on detecting the given sequence else the output is zero.

Ex : if the given sequence to be detected is 111
and input stream is 1 1 0 1 1 1 0 0 1 0 1 1 1 1 1
the output should be 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1.

One of the different possible ways to detect a sequence is using a Mealy type FSM.

Using the following table the State machine can be designed.
since the number of bits in the sequence 1101 is Source:
Question: 48) How do you do the EXPLAIN of a dynamic SQL statement?

Answer: 1. Use SPUFI or QMF to EXPLAIN the dynamic SQL statement

2. Include EXPLAIN command in the embedded dynamic SQL statements Source:
Question: 36) What is DCLGEN ? -

Answer: DeCLarations GENerator: used to create the host language copy books for the table definitions. Also creates the DECLARE table. Source:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Next

India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.203125 Seconds