Home
1.
What is the query for finding out the total number of rows in a DB2 table?

The query is SELECT COUNT(*) ... in DB2 query

2.
How can we eliminate duplicate values in DB2 SELECT ?

To eliminate duplicate values, the query is SELECT DISTINCT ... in DB2.

3.
How to select a row using indexes in DB2?

To select a row using indexes, we have to Specify the indexed columns in the WHERE clause .

4.
How can we find the maximum value in a column ?

we can Use SELECT MAX(...) .. query to find the maximum value in a column .

5.
what is the query to retrieve the first 5 characters of FIRSTNAME column of DB2 table ABC ?

The query is SELECT SUBSTR(FIRSTNAME,1,5) FROM EMP;