Computer AwarenessVery hardIBPS SO IT Officer

Table A has 5 rows and table B has 4 rows with the same columns, and exactly 2 rows appear in both; neither table has duplicates of its own. How many rows do A UNION B and A UNION ALL B return?

  1. A. 7 and 9
  2. B. 9 and 7
  3. C. 9 and 9
  4. D. 5 and 4

Correct answer: A. 7 and 9

UNION removes duplicates: 5 + 4 − 2 = 7 rows. UNION ALL keeps every row: 5 + 4 = 9.

हिंदी में

तालिका A में 5 पंक्तियाँ और तालिका B में 4 पंक्तियाँ हैं, स्तंभ वही हैं, और ठीक 2 पंक्तियाँ दोनों में आती हैं; किसी तालिका में अपनी कोई दोहराई पंक्ति नहीं है। A UNION B और A UNION ALL B कितनी पंक्तियाँ लौटाते हैं?

  1. A. 7 और 9
  2. B. 9 और 7
  3. C. 9 और 9
  4. D. 5 और 4

उत्तर: A. UNION दोहराव हटाता है: 5 + 4 − 2 = 7 पंक्तियाँ। UNION ALL हर पंक्ति रखता है: 5 + 4 = 9।

More Computer Awareness questions

Exams that ask this topic