what will be the output of the below given query, if no
matching records are found : (a.) 0 (b.) null (c.) error
select Avg(salary)
from TableA
where Deptno = 'insurance'
Answer Posted / lalit
Hi,
My understanding is different so it can be a or b. Assume
that there are 10 records and this column can have null
values. If 9 records have null and one record has vale as
zero then the answer would be zero and if all of them have
null then the answer would be null. If no rows satifies the
criteria then it would be null.
Is This Answer Correct ? | 5 Yes | 7 No |
Post New Answer View All Answers
How can we read records for specific member in CL? AND rpg?
What do you mean by rollback?
What is the function of logging in the db2 database?
what is the role of the cursor in db2?
How can you classify the locks in db2?
What is a db2 schema?
What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?
Explain packages.
Can there be more than one cursor open for any program?
Name the lockable units in DB2?
What is database manager in db2?
How do you simulate the explain of an embedded sql statement in spufi/qmf?
What is db2 and what is the use of db2 optimizer?
What is nvl in db2?
Outputs of explain are with matchcols = 0. What does this signify?