Open In App

GATE | GATE-IT-2004 | Question 76

Like Article
Like
Save
Share
Report

A table T1 in a relational database has the following rows and columns:

 roll no.  marks
 1  10
 2  20
 3  30
 4  Null

The following sequence of SQL statements was successfully executed on 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: (C)

Explanation: 10+5

20+5

30+5

NULL+5=NULL

(15+25+35)/3=25

So Answer is C

Quiz of this Question
Please comment below if you find anything wrong in the above post


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads