Enhance your skills with the CompTIA Data+ Certification Test. Engage with flashcards, tackle challenging multiple choice questions, complete with hints and explanations. Get yourself exam-ready now!

Multiple Choice

To show all records from the right-hand table even if there is no matching row in the left-hand table, which join type should you use?

To show every record from the right-hand table even when there isn’t a matching row in the left-hand table, use a right outer join. This type of join returns every row from the right table and, when there’s a match with the left table, brings in the corresponding left-side data. If there’s no match, the left-side columns appear as NULL. That exact behavior ensures you see all right-side records regardless of left-side matches. By contrast, an inner join only returns rows that have matches on both sides; a cross join creates every possible pair of rows with no regard to matching; a full outer join returns all rows from both tables, which includes left-side rows you don’t need if the requirement is solely to guarantee right-side coverage. If you wanted the same effect using the left side, you could swap the tables and use a left outer join.

To show every record from the right-hand table even when there isn’t a matching row in the left-hand table, use a right outer join. This type of join returns every row from the right table and, when there’s a match with the left table, brings in the corresponding left-side data. If there’s no match, the left-side columns appear as NULL. That exact behavior ensures you see all right-side records regardless of left-side matches.

By contrast, an inner join only returns rows that have matches on both sides; a cross join creates every possible pair of rows with no regard to matching; a full outer join returns all rows from both tables, which includes left-side rows you don’t need if the requirement is solely to guarantee right-side coverage. If you wanted the same effect using the left side, you could swap the tables and use a left outer join.