PREVIOUS YEAR SOLVED PAPERS - December 2015 Paper 3

Avatto > > UGC NET COMPUTER SCIENCE > > PREVIOUS YEAR SOLVED PAPERS > > December 2015 Paper 3

61. Consider the following three SQL queries (Assume the data in the people table):
(a)Select Name from people where Age > 21;
(b)Select Name from people where Height > 180;
(c)Select Name from people where (Age > 21) or (Height > 180);
If the SQL queries (a) and (b) above, return 10 rows and 7 rows in the result set respectively, then what is one possible number of rows returned by the SQL query (c) ?

  • Option : C
  • Explanation :
    According to question: Select Name from people where Age > 21; will return 10 rows. Select Name from people where Height > 180; will return 7 rows. Then Select Name from people where (Age > 21) or (Height > 180); will return 10 rows. Since there is or between the condition. That's why it will return 10 rows. So, option (C) is correct.
Cancel reply
Cancel reply

Related Quiz.
December 2015 Paper 3