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 function of logging in the db2 database?
Which command is used to remove all rows from a table?
What is a trigger in the db2 database?
B37 abend during spufi?
How can the firstname and the lastname from the emp table be concatenated to generate complete names?
How would the varchar column remarks defined?
Following a db2 update statement, what is the quickest way to compute the total number of updated rows?
What is performance tuning db2?
Which component is responsible for db2 startup and shutdown?
What is dbrm library?
What is null in db2?
How to check table size in db2 sap?
What are the benefits of using the db2 database?
What does sqlcabc has?
What is dclgen (declaration generator)?