Technical Job Interview Questions

Sample Interview Questions
Interview Questions
Search
Quantitative Aptitude
Mainframe Interview FAQs
DB2 Interview Questions
VSAM Interview Questions
COBOL Interview Questions
JCL Interview Questions
CICS Interview Questions
C Programs
Fresher/Experience Jobs
Free Magazine Subscription
Free Software Downloads
C Interview Questions
C++ Interview Questions
Data Structure Questions
Database/RDBMS Questions
SQL Interview Question
Computer Network Question
Operating System Question
Contact Us
Site Map
Employment Resources

Quantitative Aptitude | Mainframe Intervie Questions | DB2 Questions | CICS Questions | COBOL | JCL Questions | C Programs

DB2 Interview Questions. DB2 FAQs. DB2 Questions. DB2 Technical Interview Questions.

1) How would you find out the total number of rows in a DB2 table?
Use SELECT COUNT(*) ... in db2 query
2) How do you eliminate duplicate values in DB2 SELECT ?
Use SELECT DISTINCT ... in db2 query
3) How do you select a row using indexes in DB2?
Specify the indexed columns in the WHERE clause of db2 query.
4) How do you find the maximum value in a column in db2?
Use SELECT MAX(...) .. in db2 query
5) How do you retrieve the first 5 characters of FIRSTNAME column of DB2 table EMP?
SQL Query: SELECT SUBSTR(FIRSTNAME,1,5) FROM EMP;
6) What are aggregate functions?
Bulit-in mathematical functions for use in SELECT clause.
7) Can you use MAX on a CHAR column?
YES.
8) My SQL statement SELECT AVG(SALARY) FROM EMP yields inaccurate results. Why?
Because SALARY is not declared to have NULLs and the employees for whom the salary is not known are also counted.
9) How do you concatenate the FIRSTNAME and LASTNAME from EMP table to give a complete name?
SELECT FIRSTNAME || ‘ ‘ || LASTNAME FROM EMP;
10) What is the use of VALUE function?
1. Avoid -ve SQLCODEs by handling nulls and zeroes in computations
2. Substitute a numeric value for any nulls used in computation

DB2 Interview Questions

11) What is UNION,UNION ALL?
UNION : eliminates duplicates
UNION ALL: retains duplicates
Both these are used to combine the results of different SELECT statements.
Suppose you have five SQL SELECT statements connected by UNION/UNION ALL, how many times should I specify? UNION to eliminate the duplicate rows? Once.
12) What is the restriction on using UNION in embedded SQL?
It has to be in a CURSOR.

13) In the WHERE clause what is BETWEEN and IN?
BETWEEN supplies a range of values while IN supplies a list of values.
14) Is BETWEEN inclusive of the range values specified?
Yes.
15) What is 'LIKE' used for in WHERE clause? What are the wildcard characters?
LIKE is used for partial string matches. ‘%’ ( for a string of any character ) and ‘_’ (for any single character ) are the two wild card characters.

 

 

 
 

 

DB2 Interview Questions. DB2 Questions. DB2 Interview Question