...
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024

Database-Management-System

Question 446
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)?
A
3
B
7
C
10
D
21
Question 446 Explanation: 


→ In this case query (a) will return 10 rows, query (b) will return 7 rows and query (c) will return 17 rows because of “or” condition given in it.
Case II: When result of queries (a) & (b) have the same row.
→ This case result in minimum no. of rows possible for given table.

→ In this case maximum 10 rows will be resulted.
Option (C) is most suitable, because 10 is minimum no. of rows possible so option (A) & (B) can’t be correct choice.
And maximum no. of rows possible is 17 so option (D) is also not correct choice.
Hence answer is option (C).
Correct Answer: C
Question 446 Explanation: 


→ In this case query (a) will return 10 rows, query (b) will return 7 rows and query (c) will return 17 rows because of “or” condition given in it.
Case II: When result of queries (a) & (b) have the same row.
→ This case result in minimum no. of rows possible for given table.

→ In this case maximum 10 rows will be resulted.
Option (C) is most suitable, because 10 is minimum no. of rows possible so option (A) & (B) can’t be correct choice.
And maximum no. of rows possible is 17 so option (D) is also not correct choice.
Hence answer is option (C).
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!