What is the difference between Join and Inner Join?
What is the difference between Join and Inner Join?
227
11-Jul-2023
Updated on 12-Jul-2023
Aryan Kumar
12-Jul-2023The main difference between join and inner join is that join is a generic term for combining data from two or more tables, while inner join is a specific type of join that only returns rows where there is a match in both tables.
Here is a table that summarizes the differences between join and inner join:
For example, the following code will join the
CustomersandOrderstables:SQL
This code will return all rows from the
Customerstable, even if there are no matching rows in theOrderstable.The following code will inner join the
CustomersandOrderstables:SQL
This code will only return rows from the
Customerstable where there is a matching row in theOrderstable.The
INNER JOINkeyword is the most common type of join, and it is the default join type in most SQL databases.