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 the difference between bind and rebind in db2?
What is the function of logging in the db2 database?
What is db2 stogroup?
Is db2 relational database?
What db2 400?
What are the prerogatives?
How to check sequence on a table in db2?
How to find schema of a table in db2?
What is reorg and runstats in db2?
How do I add a column to a table in db2?
What are the 2 sqlcodes that are returned?
what is the sqlcode -501
I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?
Is the primary key a clustered index?
Explain about open switch business continuity software?