Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is scrollable cursor in db2?

996


What action db2 takes when a program aborts in the middle of a transaction?

1088


What are the contents of a dclmgen?

1066


Is db2 free?

1035


How does coalesce work?

958


What is dclgen (declaration generator)?

1009


What is package in db2 mainframe?

917


What is the physical storage length of date data type?

1189


What is a db2 table?

954


What do you mean by cursor?

942


What is iseries database?

990


What is dpf in db2?

1048


What is a Foreign Key?

1036


What do you mean by commit and rollback?

973


For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.

1054