1. Home
  2. Data Science
  3. SQL for Data Analysis
  4. Which rows does an INNER JOIN return?

Added 30 Nov -0001

Which rows does an INNER JOIN return?

  1. All rows from the left table, matched or not
  2. All rows from both tables, matched or not
  3. Only rows that exist in the left table alone
  4. Only rows that have a match in both tables Correct answer

Correct answer

D. Only rows that have a match in both tables

17 views

MCQSEXAM

Explanation

An INNER JOIN pairs rows where the join condition holds and discards everything unmatched on either side, so it can return fewer rows than either input. A LEFT JOIN keeps all left rows and pads missing right columns with NULL, and a FULL OUTER JOIN keeps unmatched rows from both sides. Choosing the wrong join type is a common cause of silently missing records in reports.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More SQL for Data Analysis MCQs

Practise all SQL for Data Analysis MCQs

Similar MCQs