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 / shailendra

It will be error, as we are using where with AVG function....we should use having

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of using commit?

609


Which component is responsible for db2 startup and shutdown?

618


What is syscat in db2?

569


What is sqlca?

608


have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.

1226






What parameters are used to control the free space in DB2?

638


Before you give the explain statement, what are the prerogatives?

573


i want to maintain uniqueness on pdf without make lf??????????

1624


What are the two types of logging in the db2 database? Explain them.

568


What is the syntax for creating a table in the db2 database?

620


How do I add a column to a table in db2?

612


What is drop table?

576


What is a db2 collection?

599


What is the difference between cursor and select statement?

605


How to fetch the last row from the table in SQL (db2)?

1025