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 scrollable cursor in db2?
What action db2 takes when a program aborts in the middle of a transaction?
What are the contents of a dclmgen?
Is db2 free?
How does coalesce work?
What is dclgen (declaration generator)?
What is package in db2 mainframe?
What is the physical storage length of date data type?
What is a db2 table?
What do you mean by cursor?
What is iseries database?
What is dpf in db2?
What is a Foreign Key?
What do you mean by commit and rollback?
For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.