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 meant by explain?
Mention the downsides of page level lock.
Is ibm db2 open source?
What is a Foreign Key?
Which component is used to execute the sql statements?
What is runstats utility in db2?
What is the purpose of using commit?
What is db2 bind process?
What's The Percentage Free Space ?
What happens in bind step in a db2 program?
Is ibm db2 free?
by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?
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?
List out the data types available.
What do you mean by commit and rollback?