In RDBMS, which type of Join returns all rows that satisfy the join condition ?

2018

In RDBMS, which type of Join returns all rows that satisfy the join condition ?

  1. A.

    Inner Join

  2. B.

    Outer Join

  3. C.

    Semi Join

  4. D.

    Anti Join

Attempted by 480 students.

Show answer & explanation

Correct answer: A

Answer: Inner Join

Explanation: An inner join returns only the rows from both tables that satisfy the join condition. Rows without matching counterparts in the other table are excluded.

  • SQL example: SELECT * FROM A INNER JOIN B ON A.id = B.a_id; — this returns only rows where A.id equals B.a_id.

  • Contrast with other joins: Outer join returns matching rows and also includes unmatched rows from one or both tables (LEFT/RIGHT/FULL).

  • Semi join returns rows from the left table that have a match in the right table but does not return right-table columns in the same way; it is a different concept.

  • Anti join returns rows from the left table that have no match in the right table (the opposite of matching rows).

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor