SQL inner join | SQL Tutorial and Query Example

Text copied!

SQL inner join


  • The syntax of the SQL inner join generally looks like this :
    Here's an example of how you might use the SQL inner join :

    Let's suppose we have two tables :

    SELECT column_name(s)
    FROM table1
    JOIN table2
    ON table1.column_name = table2.column_name;
    To enhance your understanding of 'SQL joins', be sure to check out our next tutorial.
    SQL inner join SQL inner join
    SELECT Emp.Employee_Name, Emp.Department_Id, Dpt.Department_Name
    FROM [Employees] Emp
    INNER JOIN [Departments] Dpt
    ON Emp.Department_Id = Dpt.Department_Id
            
    SQL inner join

    Frequently Asked Questions :

    Inner joins in SQL combine rows from two or more tables based on a related column between them.
    Inner join in SQL operates between two or more tables to return only the matching rows.
    The four types of joins in SQL are inner join, left join, right join, and full outer join.
    To use three inner joins in SQL, specify the tables involved and the join conditions using the INNER JOIN clause for each pair of tables being joined.