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
What is runstats db2?
How does coalesce work?
Explain about rct in db2?
What is the information associated with sysibm.syslinks table?
what is the responsibility of the construction superintendent
How to take backup of table in db2?
How do I change the column size in db2?
What is the use of commit in db2?
What is db2 bind?
How does db2 sample database connect?
Can you tell me how can you find out the # of rows updated after an update statement?
How would you find out the total number of rows in a db2 table?
How to find the number of rows in a db2 table?
What do you mean by between and in? Is between inclusive of specified range values?
What is dbrm? When it will be created?