<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://diff.wiki/index.php?action=history&amp;feed=atom&amp;title=Differences_between_Inner_Join_and_Outer_Join</id>
	<title>Differences between Inner Join and Outer Join - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://diff.wiki/index.php?action=history&amp;feed=atom&amp;title=Differences_between_Inner_Join_and_Outer_Join"/>
	<link rel="alternate" type="text/html" href="https://diff.wiki/index.php?title=Differences_between_Inner_Join_and_Outer_Join&amp;action=history"/>
	<updated>2026-04-13T06:10:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://diff.wiki/index.php?title=Differences_between_Inner_Join_and_Outer_Join&amp;diff=2172&amp;oldid=prev</id>
		<title>Dwg: Article written and Venn diagram created.</title>
		<link rel="alternate" type="text/html" href="https://diff.wiki/index.php?title=Differences_between_Inner_Join_and_Outer_Join&amp;diff=2172&amp;oldid=prev"/>
		<updated>2025-12-15T12:46:38Z</updated>

		<summary type="html">&lt;p&gt;Article written and Venn diagram created.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Inner Join vs. Outer Join ==&lt;br /&gt;
In SQL (Structured Query Language), `JOIN` clauses are used to combine rows from two or more tables based on a related column between them.&amp;lt;ref name=&amp;quot;ref1&amp;quot; /&amp;gt; The two main categories of joins are the inner join and the outer join. The primary distinction between them lies in how they handle records that do not have a matching record in the other table.&amp;lt;ref name=&amp;quot;ref2&amp;quot; /&amp;gt; An inner join returns only the rows where the join condition is met in both tables, whereas an outer join can also return rows where no match is found in the other table.&amp;lt;ref name=&amp;quot;ref3&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;ref4&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An **Inner Join** selects only the records that have matching values in both tables. If a row in the first table does not have a corresponding match in the second table, it is excluded from the result set.&amp;lt;ref name=&amp;quot;ref5&amp;quot; /&amp;gt; This is the most common type of join and is often used to retrieve data that has a clear relationship across tables, such as customers and their orders.&amp;lt;ref name=&amp;quot;ref4&amp;quot; /&amp;gt; The `INNER JOIN` keyword is used, although `JOIN` by itself defaults to an inner join in most SQL implementations.&lt;br /&gt;
&lt;br /&gt;
An **Outer Join** returns all records from at least one of the tables, even if there is no matching record in the other table.&amp;lt;ref name=&amp;quot;ref3&amp;quot; /&amp;gt; For rows that do not have a match, the columns from the other table will have `NULL` values. This type of join is useful for identifying records in one table that lack corresponding records in another. There are three types of outer joins:&lt;br /&gt;
*   **Left Outer Join** (or `LEFT JOIN`): Returns all records from the left table, and the matched records from the right table.&amp;lt;ref name=&amp;quot;ref2&amp;quot; /&amp;gt;&lt;br /&gt;
*   **Right Outer Join** (or `RIGHT JOIN`): Returns all records from the right table, and the matched records from the left table.&amp;lt;ref name=&amp;quot;ref2&amp;quot; /&amp;gt;&lt;br /&gt;
*   **Full Outer Join** (or `FULL JOIN`): Returns all records when there is a match in either the left or the right table.&amp;lt;ref name=&amp;quot;ref3&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comparison Table ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Category !! Inner Join !! Outer Join&lt;br /&gt;
|-&lt;br /&gt;
| **Matching Rows** || Returns only the rows that have matching values in both tables.&amp;lt;ref name=&amp;quot;ref5&amp;quot; /&amp;gt; || Returns matching rows, as well as non-matching rows from one or both tables.&amp;lt;ref name=&amp;quot;ref3&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| **Non-Matching Rows** || Excludes rows from both tables that do not match the join condition.&amp;lt;ref name=&amp;quot;ref5&amp;quot; /&amp;gt; || Includes non-matching rows from one or both tables, filling the columns of the non-matching table with `NULL` values.&lt;br /&gt;
|-&lt;br /&gt;
| **Result Set** || The result is the intersection of the two tables based on the join condition.&amp;lt;ref name=&amp;quot;ref4&amp;quot; /&amp;gt; || The result can be the records from the left table, right table, or both, in addition to the intersection.&amp;lt;ref name=&amp;quot;ref4&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| **Common Keywords** || `INNER JOIN`, `JOIN`. || `LEFT OUTER JOIN`, `RIGHT OUTER JOIN`, `FULL OUTER JOIN`.&lt;br /&gt;
|-&lt;br /&gt;
| **Typical Use Case** || Retrieving a dataset of records that are present in both tables being joined.&amp;lt;ref name=&amp;quot;ref5&amp;quot; /&amp;gt; || Finding records that do not have corresponding entries in the other table, or when all data from a primary table is required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[File:Venn_diagram_Differences_between_Inner_Join_versus_Outer_Join_comparison.png|thumb|center|800px|alt=Venn diagram for Differences between Inner Join and Outer Join|Venn diagram comparing Differences between Inner Join and Outer Join]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Join (SQL)]]&lt;br /&gt;
* [[Relational database]]&lt;br /&gt;
* [[Structured Query Language]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;ref1&amp;quot;&amp;gt;[https://www.w3schools.com/sql/sql_join.asp &amp;quot;w3schools.com&amp;quot;]. Retrieved December 15, 2025.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;ref2&amp;quot;&amp;gt;[https://www.freecodecamp.org/news/sql-join-types-inner-join-vs-outer-join-example/ &amp;quot;freecodecamp.org&amp;quot;]. Retrieved December 15, 2025.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;ref3&amp;quot;&amp;gt;[https://www.datacamp.com/tutorial/inner-join-vs-outer-join &amp;quot;datacamp.com&amp;quot;]. Retrieved December 15, 2025.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;ref4&amp;quot;&amp;gt;[https://stackoverflow.com/questions/38549/what-is-the-difference-between-inner-join-and-outer-join &amp;quot;stackoverflow.com&amp;quot;]. Retrieved December 15, 2025.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;ref5&amp;quot;&amp;gt;[https://www.w3schools.com/sql/sql_join_inner.asp &amp;quot;w3schools.com&amp;quot;]. Retrieved December 15, 2025.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Comparisons]]&lt;/div&gt;</summary>
		<author><name>Dwg</name></author>
		
	</entry>
</feed>