# What type of join is needed when you wish to return rows that do have matching values?

If you want to show only those rows that have matching values in the joined field, you use an inner join.

Bron: [inner join](https://support.microsoft.com/en-us/office/join-tables-and-queries-3f5838bd-24a0-4832-9bc1-07061a1478f6#:~:text=If%20you%20want%20to%20show,you%20use%20an%20inner%20join.)

Toegevoegd: 2026-01-26
Webpagina: https://1001vragen.nl/vraag/what-type-of-join-is-needed-when-you-wish-to-return-rows-that-do-have-matching-values

## Which type of join is used to return rows that have matching values?

INNER JOIN- Matching Rows Only An INNER JOIN returns only the rows that have matching values in both tables. If there is no match, the row is excluded from the result.

Bron: [INNER JOIN](https://www.thedataschool.co.uk/yoan-caboste/the-difference-between-left-join-inner-join-right-join-which-sql-defaults-to/#:~:text=INNER%20JOIN%2D%20Matching%20Rows%20Only,is%20excluded%20from%20the%20result.)

## Which MySQL join type returns records that have matching values?

INNER JOIN INNER JOINs are used to fetch only common matching records. The INNER JOIN clause allows retrieving only those records from Table A and Table B that meet the join condition. It is the most widely used type of JOIN.

Bron: [INNER JOIN INNER JOINs](https://www.devart.com/dbforge/mysql/studio/mysql-joins.html#:~:text=each%20JOIN%20type.-,INNER%20JOIN,widely%20used%20type%20of%20JOIN.)

## Which type of join returns all rows?

Outer Joins An outer join returns all rows that satisfy the join condition and also returns some or all of those rows from one table for which no rows from the other satisfy the join condition.

Bron: [Joins - Oracle Help Center](https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/Joins.html#:~:text=Outer%20Joins&text=An%20outer%20join%20returns%20all,other%20satisfy%20the%20join%20condition.)

## What type of join returns only matching rows from both tables?

INNER JOIN returns only the rows with matching values in both tables. This type of join is used when you need data in both datasets. The following query retrieves records from employees with matching rows from the departments table.

Bron: [SQL INNER JOIN vs. OUTER JOIN: Key Differences - DataCamp](https://www.datacamp.com/tutorial/inner-join-vs-outer-join#:~:text=INNER%20JOIN%20returns%20only%20the%20rows%20with%20matching%20values%20in,rows%20from%20the%20departments%20table.)

## Verwante vragen

- [Can a subquery return more than one value?](https://1001vragen.nl/vraag/can-a-subquery-return-more-than-one-value.md)
- [How can you concatenate two strings in Python * using the concat() method using the join() method using the & operator using the operator?](https://1001vragen.nl/vraag/how-can-you-concatenate-two-strings-in-python-using-the-concat-method-using-the-join-method-using-the-operator-using-the-operator.md)
- [How do you limit the number of rows returned in a query result to 5?](https://1001vragen.nl/vraag/how-do-you-limit-the-number-of-rows-returned-in-a-query-result-to-5.md)
- [How to SELECT the first 5 rows in Oracle?](https://1001vragen.nl/vraag/how-to-select-the-first-5-rows-in-oracle.md)
- [Which operator is used to concatenate or join two or more settings?](https://1001vragen.nl/vraag/which-operator-is-used-to-concatenate-or-join-two-or-more-settings.md)
- [How to resolve ora 01427 single row subquery returns more than one row?](https://1001vragen.nl/vraag/how-to-resolve-ora-01427-single-row-subquery-returns-more-than-one-row.md)
- [What will the following statement return: select employee_id last_name from employees where salary select min salary from employees group by department_id )?](https://1001vragen.nl/vraag/what-will-the-following-statement-return-select-employee-id-last-name-from-employees-where-salary-select-min-salary-from-employees-group-by-department-id.md)
- [What does the using clause in a join do?](https://1001vragen.nl/vraag/what-does-the-using-clause-in-a-join-do.md)
- [How to get the first 10 rows in SQL?](https://1001vragen.nl/vraag/how-to-get-the-first-10-rows-in-sql.md)
- [Which functions can be used to manipulate character number and date column values?](https://1001vragen.nl/vraag/which-functions-can-be-used-to-manipulate-character-number-and-date-column-values.md)
