GATE IT 2004 · SQL Queries

MCQ · 1 mark · Problem DBMS-SQL-0140

A table T1 in a relational database has the following rows and columns:\[\begin{array}{|c|c|c|} \hline \text {Roll no. } & \text {Marks} \\\hline 1& 10 \\\hline 2 & 20 \\\hline3 & 30 \\\hline 4 & \text{NULL}\\\hline \end{array}\]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?
  1. A
    18.75
  2. B
    20
  3. C
    25
  4. D
    Null

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionOfficial GATE Answer Key: Option C.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/3720/gate2004-it-76

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com