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
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
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
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.
4. Which of the following sets represents table1 LEFT JOIN table2?
a) Table1
b) Table1 ∩ Table2
c) Table1 U Table2
d) Table2
View Answer
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.