2.How can duplicate values be eliminated from DB2 SELECT?
To eliminate duplicate values in DB2 SELECT, the user has to use SELECT DISTINCT in DB2 query.
3.What is meant by aggregate function?
‘Aggregate’ functions are built in mathematical tools that are used in DB2 SELECT clause.
4.Is it possible using MAX on a CHAR column?
Yes! It is possible using the MAX on a CHAR column.
5.What is the reason that MySQL statement “SELECT AVG (SALARY) FROM EMP” generates inaccurate output?
The reason for the statement generating inaccurate outcome is because of the fact that SALARY has not been declared to have NULL and at the same time the employees whose salary is not known are also counted.
6.How can the FIRSTNAME and the LASTNAME from the EMP table concatenated to generate complete names?
Statement to concatenate the first and last name to display the full name is FIRSTNAME II ** II LASTNAME FROM EMP.
7.How the value function is used?
Two tasks are accomplished by the ‘Value’ function. The first one is avoiding –veSQLCODEs through the handling of NULLs as well as Zeroes in the computation. The second one is substituting numeric values for nulls used in computation.
8.What is UNION and UNION ALL?
UNION is the function that eliminates duplicates in the table and UNION ALL retains the duplicates. Both of these are used to combine the results generated by multiple SELECT statements.
9.Is there any restriction on its use in embedded SQL?
While using UNION in embedded SQL it has to be in a CURSOR.
10.What are meant by BETWEEN and IN and is BETWEEN inclusive of range values that are specified?
BETWEEN would supply a range of values whereas IN would provide list of values. BETWEEN is always inclusive of the range values specified.