Question

    Which type of database join returns only the matching

    rows from two tables based on a condition?
    A Inner Join Correct Answer Incorrect Answer
    B Left Outer Join Correct Answer Incorrect Answer
    C Right Outer Join Correct Answer Incorrect Answer
    D Full Outer Join Correct Answer Incorrect Answer
    E Cross Join Correct Answer Incorrect Answer

    Solution

    An Inner Join returns only rows that have matching values in both tables, based on the specified condition. It is the most commonly used type of join, ensuring data consistency by combining related rows. For instance, if Table A contains customer IDs and Table B contains order IDs, an inner join on CustomerID retrieves only customers who have placed orders. This eliminates unrelated rows, simplifying the result set to the relevant data. Why Other Options Are Incorrect : 2. Left Outer Join : This includes all rows from the left table and matching rows from the right, with NULLs for non-matches. 3. Right Outer Join : This includes all rows from the right table and matching rows from the left, with NULLs for non-matches. 4. Full Outer Join : This includes all rows from both tables, with NULLs for non-matches in either table. 5. Cross Join : This returns the Cartesian product of the two tables, including all possible combinations of rows.

    Practice Next