SQL Questions and Answers – SQL Left Join

This set of SQL Multiple Choice Questions & Answers (MCQs) focuses on “SQL Left Join”.

1. Table1 LEFT JOIN Table2 returns _____
a) All records from the Table2 and the matched records from the Table1
b) All records from the Table1 and the matched records from the Table2
c) Records that have matching values in both tables.
d) All records when there is a match in either Table1 or Table2
View Answer

Answer: b
Explanation: LEFT JOIN returns all the rows of the table on the left side of the join and matching rows for the table on the right side of join.

2. If there is no matching row on right side table of LEFT JOIN, the result-set contains ____
a) Zero
b) Blank
c) A default value
d) Null
View Answer

Answer: d
Explanation: The rows for which there is no matching row on the right side table of LEFT JOIN, the result-set will contain null.

3. Instead of LEFT JOIN, which of the following can be used to produce same result?
a) Join
b) Left outer join
c) Left inner join
d) Inner join
View Answer

Answer: b
Explanation: LEFT JOIN returns all records from the left table, and the matched records from the right table. We can use LEFT OUTER JOIN instead of LEFT JOIN; both of them produce same result.
advertisement
advertisement

4. Which of the following sets represents table1 LEFT JOIN table2?
a) Table1
b) Table1 ∩ Table2
c) Table1 U Table2
d) Table2
View Answer

Answer: a
Explanation: The LEFT JOIN keyword returns all records from the table1 irrespective of the matching condition(s) and the matched records from the table2.

Sanfoundry Global Education & Learning Series – SQL.

To practice all areas of SQL, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.