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
can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well
What is bind and rebind in db2?
How can you do the explain of a dynamic sql statement?
What is a plan and package in db2?
What does reorg do in db2?
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?
What are host variables in db2?
Which isolation level provides maximum concurrency?
How many databases are there?
What are the various isolation levels possible?
Why do we bind in db2?
Is it possible to create an Instance in DB2 using DB2 Control Center ?
What is consistency token in db2?
What is universal database?
How can you find out the # of rows updated after an update statement?