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
List out the three types of page locks that can be held.
What are the 2 sqlcodes that are returned?
What is the connection string to connect to the DB2 Database ?
What is runstats and reorg in db2?
What are the various data types available in db2?
How do I import a csv file into db2?
Explain in detail about buffer manager and its functionalities?
What is bind plan?
What is null indicator in db2?
My sql statement select avg(salary) from emp yields inaccurate results. Why?
What is db2 instance?
What is consistency token in db2?
How to find the number of rows in a db2 table?
Is db2 a programming language?
what is utility for parm lib