GATE 2007
October 14, 2023Database-Management-System
October 14, 2023Database-Management-System
Question 23 |
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?
18.75 | |
20 | |
25 | |
NULL |
Question 23 Explanation:
Update on null values gives null. Now, avg function ignores null values. So, here avg will be
(15+25+35)/3 = 25
(15+25+35)/3 = 25
Correct Answer: C
Question 23 Explanation:
Update on null values gives null. Now, avg function ignores null values. So, here avg will be
(15+25+35)/3 = 25
(15+25+35)/3 = 25
Subscribe
Login
0 Comments