Computer AwarenessVery hardIBPS SO IT Officer
Table ACCOUNT has 5 rows and table NOMINEE has 4 rows. Three accounts match exactly one nominee each, and two accounts match none. How many rows does ACCOUNT LEFT OUTER JOIN NOMINEE on the account number return?
- A. 3
- B. 20
- C. 7
- D. 5
Correct answer: D. 5
A left join keeps every row of the left table: 3 matched rows plus 2 unmatched rows padded with NULLs = 5. An inner join would return 3, and a cross join 20.
हिंदी में
तालिका ACCOUNT में 5 पंक्तियाँ और तालिका NOMINEE में 4 पंक्तियाँ हैं। तीन खाते प्रत्येक ठीक एक नामांकित से मेल खाते हैं, और दो खाते किसी से नहीं। खाता संख्या पर ACCOUNT LEFT OUTER JOIN NOMINEE कितनी पंक्तियाँ लौटाता है?
- A. 3
- B. 20
- C. 7
- D. 5
उत्तर: D. लेफ़्ट जॉइन बाईं तालिका की प्रत्येक पंक्ति रखता है: 3 मिलान वाली पंक्तियाँ और NULL से भरी 2 बेमेल पंक्तियाँ = 5। इनर जॉइन 3 लौटाता, और क्रॉस जॉइन 20।
More Computer Awareness questions
- Table A has 6 rows and 3 columns, and table B has 4 rows and 2 columns. What does SELECT FROM A, B (with no WHERE clause) return?
- A column Bonus holds the values 10, 20, NULL and 30 in four rows. What does SELECT AVG(Bonus) return?
- Which statement about DELETE and TRUNCATE in SQL is correct?
- In which order does a database logically process the clauses of a SELECT statement?
- The condition WHERE Salary BETWEEN 20000 AND 30000 selects rows whose salary is:
- A query must list the customers who have no phone number recorded (the Phone column is NULL). Which condition works?