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

It depends up on the which database we are using. I m using
PostgreSQL it is in open source.It returns 0 value.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

While unloading huge amount of data from table. Suddenly job failed some error. Imagine 1M data unloading, In that 90% data unloaded only 10% left, So if want to unload the rest 10% what needs to be done? Whether do i need to start from top or anything ?

1807


What is plan in cobol db2?

580


What is difference between rollback and commit?

616


How to take backup of table in db2?

591


What are concurrency issues?

624






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

620


What are foreign keys in db2?

607


What is rct?

744


Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

617


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?

7476


How is a typical db2 batch pgm executed?

633


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

634


Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....

1884


What is node in db2?

602


Can we update view in db2?

551