SQL- Inner JOIN with example
An INNER JOIN between two or more tables is the Cartesian product that satisfies the join condition in the WHERE clause.
- Inner join fetch the data from two or more related tables.
- JOIN is same as INNER JOIN ,Join can be also written instead of Inner Join.
SELECT select_List FROM table1 INNER JOIN table2 ON table1.matchingColoumn= table2.matchingColoumn;
Consider Employee table having below records.
Consider Department table having below records.
List all the employees along with department details.
Select e1.EmployeeID ,e1.Employee_FirstName ,e1.Employee_LastName ,e1.City , d.DepartmentID , d.departmentName
from Employee e1 INNER JOIN Department d