Home
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;