Database MCQ

1:

 A table T1 in a relation database has following rows and columns.

Roll number                       Marks.
1                                           10
2                                           20
3                                           30
4                                           NULL

The following sequence of SQL statements was successfully executed in table T1.

Update T1 set marks =marks + 5 ;

select avg(marks) from T1 ;

 What is the output of the select statement?

 

A.

18.75

B.

20

C.

25

D.

NULL

 

Answer : A

Explanation :

Average = (15+25+35+null)/4 = 18.75

kiran said: (3:45pm on Sunday 12th May 2013)
5 in each marks then calculate and find its average
mubina said: (3:44pm on Thursday 27th June 2013)
null is updated but the average calculated on (15 25 35)/3 so it wwill give output 25

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.