This set of SQL Multiple Choice Questions & Answers (MCQs) focuses on “SQL Right Join”.
1. Table1 RIGHT JOIN Table2 returns _____
a) All the records from Table2 and matched records from Table1
b) Records with matching values in both tables
c) All the records from Table1 and matched records from Table2
d) All records when there is a match in either Table1 or Table2
View Answer
Explanation: The RIGHT JOIN keyword returns all the records from the right table and the matched records from the left table.
2. If no match exists on the left side of RIGHT JOIN, the result-set will contain ____
a) Blank
b) Zero
c) Null
d) Random value
View Answer
Explanation: The rows for which there is no matching row on the left side table of RIGHT JOIN, the result-set will contain null.
3. Which of the following sets represents table1 RIGHT JOIN table2?
a) Table1 U Table2
b) Table1
c) Table2
d) Table1 ∩ Table2
View Answer
Explanation: RIGHT JOIN returns all the records from the table2 irrespective of the matching condition(s) and the matched records from the table1.
4. Instead of RIGHT JOIN, which of the following can be used to produce same result?
a) Inner join
b) Right inner join
c) Right outer join
d) Join
View Answer
Explanation: RIGHT JOIN returns all records from the right table, and the matched records from the left table. We can use RIGHT OUTER JOIN instead of RIGHT JOIN; both of them produce same result.
Sanfoundry Global Education & Learning Series – SQL.
To practice all areas of SQL, here is complete set of 1000+ Multiple Choice Questions and Answers.