meetsrk
New User
Joined: 13 Jun 2004 Posts: 85
|
|
|
|
hi ppl,
when we are using average function in a query for a table where some of the salary are null then wat will be the output of the following query,
Code: |
select avg(salary) from emp
|
say emp has 10 records out of which 3 records are having NULL value.
so will it calculate the sum of the all the salaries irrespective of NULL(taking nulls as zero) and divides by 10.
or
will it calculate the sum of all the salaries which does not have NULL and divide it by 7 |
|