61) What is meant by null?
A) This is a special value that indicates the absence of data in a column. This value is indicated by a negative value, usually -1.
62) What is an object?
A) An object is anything that is managed by DB2 (that is databases, table spaces, tables, views, indexes or synonyms), but
not the data itself.
63) Describe referential integrity?
A) Referential integrity refers to a feature in DB2 that is used to ensure consistency of the data in the database.
64) Describe a primary key?
A) A primary key is a key that is unique, non-null, and is part of the definition of a table. A table must have a primary key
to be defined as a parent.
65) How would you find out the total number of rows in a table?
A) Use SELECT COUNT(*) ...
Q) How do you eliminate duplicate values in SELECT?
66) Use SELECT DISTINCT ...
67) How do you select a row using indexes?
A) Specify the indexed columns in the WHERE clause.
68) What are aggregate functions?
A) Bulit-in mathematical functions for use in SELECT clause.
69) How do you find the maximum value in a column?
A) Use SELECT MAX(...
70) Can you use MAX on a CHAR column?
71) My SQL statement SELECT AVG(SALARY) FROM EMP-TABLE
yields inaccurate results. Why?
A) Because SALARY is not declared to have Null?s and the employees for whom the salary is not known are also
72) How do you retrieve the first 5 characters of FIRSTNAME column of EMP table?
A) SELECT SUBSTR(FIRSTNAME,1,5) FROM EMP;
73) How do you concatenate the FIRSTNAME and LASTNAME from EMP table to give a complete name?
A) SELECT FIRSTNAME || ' ' || LASTNAME FROM EMP;
74) What is the use of VALUE function?
A) Avoid negative SQLCODEs by handling nulls and zeroes in computations.
Substitute a numeric value for any nulls used in computation.
75) What is UNION,UNION ALL?
A) UNION eliminates duplicates
UNION ALL: retains duplicates
Both these are used to combine the results of different SELECT statements.